Quick answer
Choose a symbology (EAN-13, EAN-8, UPC-A, Code 128, Code 39 or ITF-14), enter the data and download a PNG or SVG: the tool calculates the check digit, flags invalid input and lets you set the print size in millimetres. “Batch” mode makes up to 200 barcodes at once and downloads them as a ZIP. Note that drawing a barcode doesn't give you a valid retail number: EAN codes used in shops must be issued by GS1.
What is a barcode and which type should you use?
A barcode writes a string of digits or characters as black and white bars so a scanner can read it quickly and reliably. Each symbology has its own rules for allowed characters, length, check digits and the blank margins on either side. This tool encodes everything in your browser following the ISO/IEC and GS1 specifications, with nothing uploaded. SVG output is a vector image at the exact size in millimetres, and PNG output is rendered at the printer resolution you pick (150, 300 or 600 DPI), so it prints at the right size without blurred bars.

How to create a barcode
- 1
Choose the “Barcode type”. Retail products use EAN-13 (UPC-A in North America), shipping cartons use ITF-14, and internal labels or order numbers with letters use Code 128.
- 2
Enter the data. For EAN, UPC and ITF-14 you only need the main digits and the check digit is added for you; if you enter the full number, the tool verifies the last digit.
- 3
Adjust “Narrowest bar width” and “Bar height” for your label; the “Printed” line shows the real size of the barcode.
- 4
Press “Download PNG” (choose the DPI of your printer) or “Download SVG” (for design software).
- 5
Need many codes? Choose “Batch”, paste one code per line and press “Download all (.zip)”.
Supported barcode types
| Type | Data | Used for | Standard |
|---|---|---|---|
| EAN-13 | 13 digits (12 + check digit) | Retail products scanned at the till | ISO/IEC 15420, GS1 General Specifications |
| EAN-8 | 8 digits (7 + check digit) | Packs too small for EAN-13 | ISO/IEC 15420, GS1 |
| UPC-A | 12 digits (11 + check digit) | Products sold in the US and Canada | ISO/IEC 15420, GS1 |
| Code 128 | ASCII letters, digits and symbols (sets A, B, C) | Warehouse labels, order and serial numbers | ISO/IEC 15417 |
| Code 39 | A–Z, 0–9 and - . space $ / + % | Asset tags, older industrial labels | ISO/IEC 16388 |
| ITF-14 | 14 digits (13 + check digit) | Outer cartons holding several units | ISO/IEC 16390, GS1 |
Swipe sideways to see the whole table →
Code 128 here is plain Code 128. GS1-128 (with the FNC1 character and application identifiers such as (01), (17), (10)) is a different format the tool doesn't produce yet.
GS1 print sizes
| Type | Narrow bar (X) at 100% | Allowed range | Bar height | Quiet zones |
|---|---|---|---|---|
| EAN-13 | 0.330 mm | 80–200% (0.264–0.660 mm) | 22.85 mm at 100%, scaled with size | 11X left, 7X right |
| EAN-8 | 0.330 mm | 80–200% | 18.23 mm at 100% | 7X each side |
| UPC-A | 0.330 mm | 80–200% | 22.85 mm at 100% | 9X each side |
| ITF-14 | No fixed 100% size | 0.495–1.016 mm | At least 32 mm | At least 10X each side |
Swipe sideways to see the whole table →
Figures from the GS1 General Specifications and GS1 UK's size guidance. Printing below 80% or cutting the bar height short are the most common reasons a barcode won't scan at the till.
Examples
EAN-13 for a product that already has a GS1 number
Enter the first 12 digits of the number GS1 issued to you, let the tool add the check digit, keep the narrow bar at 0.33 mm and the height at 23 mm, and download the SVG for your packaging artwork.
Warehouse labels on a thermal printer
Choose Code 128, enter a location code such as “WH-A-01-03”, set the narrow bar to 0.25 mm and download a 300 DPI PNG (or 600 DPI for a 600 DPI printer) so the bars stay sharp.
150 asset tags at once
Choose “Batch”, paste 150 staff or equipment codes, one per line, and download a ZIP of 150 PNG files named after their codes, ready for a mail-merge label template.
Common problems
- Making up a number with a country prefix to sell products.
- Retail EAN/UPC numbers must be issued to your company by a GS1 organisation. A made-up number may belong to someone else and can be rejected by retailers and marketplaces.
- “The last (check) digit is wrong”.
- The last digit of EAN, UPC and ITF-14 is calculated from the others. Remove it so the tool computes it, or check for a typo.
- The printed barcode won't scan.
- Usually it's printed too small (narrow bar under 0.264 mm for EAN-13), missing its quiet zones, printed in a light colour on a dark background, or a PNG was enlarged and blurred. Use SVG or a PNG at your printer's DPI.
- Code 39 turns lowercase into capitals, or rejects a character.
- Code 39 only has CAPITAL letters, digits and seven symbols (- . space $ / + %), so the tool converts to capitals. To keep lowercase or use characters like “_” or “#”, choose Code 128.
- Resizing the barcode in Word or Canva distorts the bars.
- Stretching in one direction breaks the bar ratios. Change the size in the tool and download again, or keep the aspect ratio locked when resizing.
Country prefixes and GS1
The first digits of an EAN-13 are the prefix of the national GS1 organisation that issued the number; 893, for example, is GS1 Vietnam. The prefix tells you where the number was issued, not where the product was made.
To use EAN or UPC numbers on retail products, you license them from your national GS1 organisation and usually pay an annual fee. In Vietnam the procedure currently follows Decree 74/2018/NĐ-CP as amended by Decree 13/2022/NĐ-CP (in force since 15 March 2022); rules change, so check the current regulations and your GS1 office before applying.
This tool only draws the barcode for the number you enter. When a number starts with 893, it reminds you to use only numbers issued to your own company.
How the encoding works
The bar pattern tables, check digit calculations and quiet zones are implemented from the specifications and checked against published sample numbers (5901234123457, 4006381333931, 96385074, 036000291452, 15400141288763) and by decoding the generated bars back into digits.
- EAN-13, EAN-8, UPC-A: GS1 check digit (alternate weights 3 and 1 from the right, then the amount needed to reach a multiple of 10); the left six digits of an EAN-13 use an L/G parity pattern set by the first digit.
- Code 128: “Automatic” mode picks the character sets that give the shortest symbol, switching to set C for runs of four or more digits; modulo 103 check character.
- Code 39: wide-to-narrow ratio of 3:1 with “*” start and stop characters; optional modulo 43 check character.
- ITF-14: digits are encoded in pairs (bars carry the odd positions, spaces the even ones) with a 2.5:1 wide-to-narrow ratio and a bearer bar frame that prevents partial reads on corrugated cartons.
PNG or SVG?
SVG is a vector image that scales without losing sharpness and carries its size in millimetres, ideal for packaging artwork in Illustrator, Inkscape, Figma or CorelDRAW. PNG suits label software, Word and Excel; pick your printer's DPI (thermal label printers are often 203 or 300 DPI) so each bar lines up with the printer's dots instead of blurring.
Glossary
- GTIN
- Global Trade Item Number managed by GS1; EAN-13, UPC-A, EAN-8 and ITF-14 are ways of writing a GTIN as a barcode.
- Check digit
- The last digit, calculated from the others, which lets scanners detect misreads.
- X-dimension
- The width of the narrowest bar or space; every other dimension of the symbol is a multiple of X.
- Quiet zone
- The blank margin required on each side so the scanner knows where the symbol starts and ends.
- Bearer bar
- A thick frame around an ITF-14 symbol that evens out printing pressure and stops partial scans.
- DPI
- Dots per inch (25.4 mm) when printing.
Frequently asked questions
Can I use these barcodes on products I sell?
The images, yes, but the number must be valid: EAN-13 and UPC-A numbers for retail must be issued to your company by GS1. Internal codes (Code 128, Code 39) can be anything you like.
What does the 893 at the start mean?
It's the GS1 Vietnam prefix, meaning the number was issued in Vietnam. It doesn't prove the product was made there.
How big should an EAN-13 be printed?
At the standard 100% size the narrow bar is 0.33 mm and the symbol is about 37 mm wide including quiet zones. GS1 allows 80–200%; avoid going below 80% or cutting the bar height.
Can Code 128 hold accented letters?
No. Code 128 only encodes ASCII characters, so remove accents first (the Slug generator can help).
Can it make QR codes?
QR codes are two-dimensional, a different kind of symbol. Use the Công Cụ Nhanh QR code generator instead.
Is my data uploaded?
No. Barcodes are generated in your browser, and PNG, SVG and ZIP files are packaged on your device.
Ratings and comments
Loading…