How to create a barcode
- Choose the type and enter the number. For retail codes enter the digits without the check digit; wrong check digits are flagged with the correct value.
- Set the printer DPI, X-dimension or magnification, bar height and quiet zone under Print size and resolution, and colour and human-readable text under Appearance, with a live preview.
- Download SVG, PDF or EPS for packaging and print, PNG or JPG for spreadsheets and web pages, or switch to Label sheets to print at true size.
EAN-13 barcode anatomy
- GS1 prefix (690–699 = issued by GS1 China, not the country of origin)
- Company prefix + item reference, 9 digits together; the company prefix length (4–8 digits after the GS1 prefix) is set by GS1
- Check digit, from the first 12 digits by GS1 modulo 10
How the EAN-13 check digit is calculated
From the left, multiply positions 1, 3, 5… by 1 and 2, 4, 6… by 3 (counting left from the check digit, the first is ×3). Add the products and round up to the next multiple of 10; the difference is the check digit. Check digit working below the generator shows this for your own number.
| Position | Number | Multiplier | Result |
|---|---|---|---|
| 1 | 6 | 1 | 6 |
| 2 | 9 | 3 | 27 |
| 3 | 0 | 1 | 0 |
| 4 | 1 | 3 | 3 |
| 5 | 2 | 1 | 2 |
| 6 | 3 | 3 | 9 |
| 7 | 4 | 1 | 4 |
| 8 | 5 | 3 | 15 |
| 9 | 6 | 1 | 6 |
| 10 | 7 | 3 | 21 |
| 11 | 8 | 1 | 8 |
| 12 | 9 | 3 | 27 |
The total is 128; the next multiple of 10 is 130 and 130 − 128 = 2, so the full number is 6901234567892.
2- and 5-digit add-ons
EAN-13, UPC and ISSN codes can carry a small add-on on the right: 2 digits usually give a magazine issue number (issue 52 = 52) and 5 digits a book price (51299 = US$12.99). Enter 2 or 5 digits under Add-on; the gap to the main symbol follows GS1 at 7–12X.
Which barcode should I use?
| Type | Used for | Content |
|---|---|---|
| EAN-13 | Retail products worldwide (China, Europe, Asia) | Digits, 13 including the check digit |
| UPC-A / UPC-E | US and Canadian retail; UPC-E for small packs | Digits, 12 / 8 |
| EAN-8 | Packs too small for EAN-13 | Digits, 8 |
| ISBN | Books (EAN-13 plus price add-on) | 13 digits from 978/979, optional 5-digit add-on |
| ITF-14 | Outer cartons (GTIN-14) with bearer bars | Digits, 14 |
| GS1-128 | Logistics labels: SSCC, batch, expiry, weight | GS1 Application Identifiers |
| Code 128 | Internal IDs, bin locations, Amazon FNSKU, parcels | Letters, digits and symbols |
| Code 39 | Industrial, automotive and legacy systems | Upper-case letters, digits, - . $ / + % |
| Data Matrix | Small parts, electronics, medical devices (GS1 DataMatrix) | Any text, up to about 2,000 characters |
| PDF417 | IDs, boarding passes, shipping documents | Any text, up to about 1,800 characters |
| ISSN / ISMN | Magazines and serials (977, with a 2-digit issue add-on); printed music (979-0) | 8-character ISSN / ISMN-13 |
| SSCC-18 | Unique pallet and logistics-unit numbers (GS1-128 AI 00) | Digits, 18 |
| Interleaved 2 of 5 | Warehouse and distribution-centre numbers | Even number of digits |
| Code 93 | Canada Post and logistics; more compact than Code 39 | Upper-case letters, digits, symbols (Full ASCII adds lower case) |
| PZN | German pharmaceutical number (a Code 39 variant) | Digits, 8 |
| GS1 DataBar | Fresh produce, variable-weight items, coupons, small pharma packs | GTIN-14; Expanded adds weight, expiry and more |
| GS1 Digital Link QR | The QR code for retail packs from 2027 (GS1 Sunrise 2027), serving checkout and shoppers | https://id.gs1.org/01/… URL carrying the GTIN |
| QR / Micro QR / rMQR | URLs, manuals, tiny and long narrow spaces | Any text; Micro QR about 21 characters |
| Aztec / MaxiCode | Tickets and boarding passes; UPS parcel sorting | Any text; MaxiCode about 90 characters |
| MicroPDF417 | Stacked code for small packs and medical devices | Any text, up to about 150 characters |
Print size and scanning requirements
X is the width of the narrowest bar. GS1 allows retail codes from 80% to 200%; codes printed smaller or with truncated bars may not scan. Use dark bars on a light background: red, orange and yellow bars are invisible to red-light scanners. Test-scan the first print.
| Type | X-dimension | Bar height | Quiet zone |
|---|---|---|---|
| EAN-13 / UPC-A | 0.264 – 0.660 mm(80% – 200%) | About 22.85 mm at 100% | Left 11X, right 7X (UPC-A 9X each side) |
| ITF-14 | 0.495 – 1.016 mm | At least 32 mm | 10X each side plus bearer bars |
| GS1-128 | Logistics labels 0.495 – 1.016 mm | At least 32 mm | 10X each side |
| Code 128 / FNSKU | Ideally at least 0.25 mm | At least 6 mm or 15% of the length | 10X each side |
| GS1 DataBar | At least 0.264 mm | Omni at least 33X | No extra quiet zone needed |
| 2D codes (QR, Data Matrix…) | Modules at least 0.25 mm; 0.5 mm or more for phone scanning | — | QR 4 modules, Data Matrix 1–2 modules |
Snap to whole printer dots
Printers can only print whole dots. On a 203 dpi thermal printer a dot is about 0.125 mm, so an X of 0.33 mm (2.6 dots) prints some bars 2 dots wide and some 3, and uneven bars scan poorly. Choose your printer DPI under Print size and resolution and the X-dimension snaps to whole dots (0.375 mm = 3 dots at 203 dpi), with the real magnification and print size shown.
Where do retail barcode numbers come from?
This tool draws barcodes; it does not issue numbers. To sell through supermarkets, Amazon, Walmart and other retailers, EAN/UPC numbers come from a GS1 company prefix licensed by your national GS1 office, with one number per product; cheaply resold numbers may be rejected by marketplaces. Internal, warehouse and FNSKU labels can use Code 128 with no registration.
GS1 Sunrise 2027: retailers worldwide aim to scan 2D codes at checkout by the end of 2027. New packs can add a GS1 Digital Link QR code beside the EAN/UPC (choose GS1 Digital Link QR and enter the GTIN): shoppers open the product page with a phone, and checkout reads the same GTIN. Keep the EAN/UPC during the transition.
Frequently asked questions
What does a 690 prefix mean?
The first 2–3 digits are the GS1 Member Organisation prefix; 690–699 are issued by GS1 China. They show where the number was licensed, not where the product was made.
How small can an EAN-13 be printed?
GS1 allows 80%, about 29.8 mm wide with about 18.3 mm bars (excluding digits); smaller risks failures. At 100% (about 37.3 × 25.9 mm) is safest when the pack allows.
Can I use the barcodes commercially? Do they expire?
Yes: free, no watermark, commercial use allowed, and they never expire. A barcode is just your number drawn as bars, created in your browser without passing through our server.
What if the printed barcode does not scan?
The usual causes are printing too small, truncated bar height, crowded quiet zones or poor contrast. Print larger following the size table, set the print scale to Actual size / 100%, and use a 203 dpi or better thermal printer.
SVG, PNG or printed labels?
Give designers SVG for packaging and print (vector, scales cleanly); use PNG in Excel, web pages and Word; use label printing for office or thermal printers, laid out at true millimetre size.
Can I export PDF or EPS, or set the DPI?
Yes. A single barcode downloads as PNG, SVG, PDF, EPS, JPG or WebP, and bulk ZIPs offer the same formats. PDF and EPS are vector files at true millimetre size for print shops and Illustrator; PNG/JPG carry the DPI you choose, so Word and InDesign place them at the right size.
How do I set the X-dimension, magnification and DPI?
Under Print size and resolution pick the printer DPI, then enter the X-dimension (for retail codes you can enter the magnification instead; 100% = 0.33 mm). Bars snap to whole printer dots and the real X, magnification and print size are shown, with a warning outside the GS1 range.
How is the EAN-13 check digit calculated?
Take the first 12 digits; multiply the 1st, 3rd, 5th… digits from the left by 1 and the 2nd, 4th, 6th… by 3, and add everything up; subtract the last digit of the sum from 10 to get the 13th, check digit (if that last digit is 0, the check digit is 0). For 690123456789: odd positions 6+0+2+4+6+8 = 26, even positions (9+1+3+5+7+9) × 3 = 102, total 128, check digit = 10 − 8 = 2, giving 6901234567892. This tool calculates and verifies it automatically and flags a mistyped digit.