N
NJHTools

Barcode Generator

Type a number or text, pick a format — Code 128, EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, Code 39, Codabar, MSI or Pharmacode — and download a scannable barcode as PNG or SVG. EAN-13 and UPC check digits are calculated and verified automatically, and batch mode makes up to 100 barcodes at once. Free, and nothing leaves your browser. Need a 2D code for a URL or Wi-Fi login? Use the QR Code Generator.

Any ASCII text — letters, digits, symbols. Best general-purpose choice.

Appearance
2px
100px
10px
20px
Loading barcode engine…
  • Code 128 has a built-in mod 103 check character; scanners verify it automatically and it isn't printed.

Download PNG is 2x (sharp on most screens and print); use 4x for large labels or SVG for any size.

Need to encode a URL, Wi-Fi login or non-Latin text? Make a QR code instead.

How to make a barcode

  1. Choose a barcode type. Pick Code 128 for general text and internal labels, EAN-13 or UPC-A for retail products, ITF-14 for shipping cartons, or Code 39, Codabar, MSI or Pharmacode for legacy systems.
  2. Enter the value. Type the number or text to encode. For EAN, UPC and ITF-14 you can leave off the last digit and the check digit is calculated for you; if you enter it, it is verified.
  3. Adjust the appearance. Set the bar width, height, quiet-zone margin, font size and colours, and choose whether to show the human-readable text under the bars.
  4. Download or copy. Download a PNG at 1x, 2x or 4x, or an SVG that scales to any size, or copy the image to paste into a document. Switch to Batch to create up to 100 barcodes at once, one per line, and download them all as PNG.

Barcode types compared

TypeCharactersLengthCheck digitTypical use
Code 128Full ASCII textVariableMod 103 (automatic)Shipping labels, inventory, asset tags, GS1-128
EAN-13Digits12 + checkGS1 mod 10Retail products worldwide, books (ISBN)
UPC-ADigits11 + checkGS1 mod 10Retail products in the USA and Canada
UPC-EDigits6 (+ system + check)GS1 mod 10Small packages; zero-suppressed UPC-A
EAN-8Digits7 + checkGS1 mod 10Small retail items
ITF-14Digits13 + checkGS1 mod 10Outer cartons and cases (GTIN-14)
Code 39A–Z, 0–9, - . $ / + % spaceVariableOptionalAutomotive, defence, ID badges
Codabar0–9, - $ : / . +VariableNoneLibraries, blood banks, FedEx airbills
MSI PlesseyDigitsVariableMod 10 / Mod 11Retail shelf labels, warehouses
PharmacodeNumber 3–131070—NonePharmaceutical packaging control

Printing barcodes that scan first time

  • Keep the quiet zone.Scanners need blank space on both sides — at least 10 times the narrowest bar. Don't set the margin to 0 unless your label layout already provides the white space.
  • Use high contrast. Black or dark blue bars on white work best. Red bars are invisible to most laser scanners, and inverted (light-on-dark) barcodes often fail.
  • Don't print too small. Retail EAN-13 symbols are nominally about 37 × 26 mm; going much below 80% of that size makes them hard to read. Export SVG or a 4x PNG so the bars stay crisp.
  • Scale evenly. Resize the image proportionally — stretching only the width changes the bar ratios the scanner relies on.
  • Test before a print run. Scan a printed sample with a phone app or the actual scanner before ordering labels in bulk.

Related tools

Frequently Asked Questions

Which barcode type should I use?↓

For products sold in shops use EAN-13 (worldwide) or UPC-A (USA and Canada) with a number issued by GS1. For shipping cartons use ITF-14. For your own inventory, asset tags, tickets or anything containing letters, use Code 128 — it is compact and almost every 1D scanner reads it.

How is the EAN-13 or UPC check digit calculated?↓

Starting from the rightmost digit of the number without its check digit, multiply the digits alternately by 3 and 1 and add them up. The check digit is the amount needed to reach the next multiple of 10. For 400638133393 the weighted sum is 89, so the check digit is 1 and the full EAN-13 is 4006381333931. The generator does this for you and shows the working.

Can I make a barcode for my product to sell in stores?↓

You can draw any EAN or UPC barcode here, but retailers require the number itself to be licensed from GS1 (or your national GS1 office) so it is unique worldwide. Once you have your GS1 number, enter it here to produce print-ready PNG or SVG artwork.

Should I download PNG or SVG?↓

SVG is a vector file that stays perfectly sharp at any size, so it is best for print, packaging and design tools like Illustrator, Figma or Inkscape. PNG is best for web pages, documents and label software; choose 2x or 4x for crisp printing.

Why won't my barcode scan?↓

The most common causes are too little contrast (use dark bars on a light background — never light bars on dark), a missing quiet zone (keep the margin), bars printed too small or blurry, or a wrong check digit. Increase the bar width or export at 4x or SVG, and avoid stretching the image unevenly.

What is the difference between a barcode and a QR code?↓

A barcode is one-dimensional and usually stores a short number or code that a database looks up, which is what retail and warehouse scanners expect. A QR code is two-dimensional and can store a whole URL, Wi-Fi login or text in any language, and can be read by any phone camera.

Last updated: