What this barcode generator does
Enter a number or some text and pick the barcode type: the generator creates EAN-13, EAN-8, UPC-A, ISBN, Code 128, Code 39 and ITF-14 barcodes right in your browser. If the check digit is missing, it calculates it; if it is wrong, it tells you the correct one. Quiet zones follow the standards, and you download the result as an SVG in millimetres or as a PNG at print resolution.
Which barcode type do I need?
That depends on where the code will be scanned:
| Use | Barcode | Content |
|---|---|---|
| Retail products | EAN-13 | 13 digits (GTIN-13) |
| Very small packs | EAN-8 | 8 digits |
| Retail in the USA and Canada | UPC-A | 12 digits |
| Books | ISBN as EAN-13 | 978 or 979 plus 10 digits |
| Outer cartons and pallets | ITF-14 | 14 digits (GTIN-14) |
| Warehouse, shipping, internal labels | Code 128 | letters, digits, punctuation |
| Older warehouse and industrial systems | Code 39 | A–Z, 0–9 and seven symbols |
For the same content, Code 128 is usually much narrower than Code 39. Choose Code 39 only when an existing system requires it.
Do I get an EAN number here?
No. The generator draws the barcode for a number you already have. Retail numbers are issued by GS1: you join your national GS1 organisation (GS1 UK, GS1 US and so on), receive a company prefix and number your products from it. A number you invent may already belong to someone else’s product. ISBNs come from your national ISBN agency rather than GS1 — Nielsen in the UK and Ireland, Bowker in the US. For internal labels such as shelf locations, assets or work orders you need no registration; use Code 128.
How is the check digit calculated?
EAN-13, EAN-8, UPC-A and ITF-14 use the modulo 10 method from the GS1 General Specifications: weight the digits from right to left alternately by 3 and 1, add them up, and the check digit fills the sum to the next multiple of ten. For 400638133393:
3 × 3 + 9 + 3 × 3 + 3 + 3 × 3 + 1 + 8 × 3 + 3 + 6 × 3 + 0 + 0 × 3 + 4 = 89
One more makes 90, so the complete number is 4006381333931. If you type the check digit yourself, the generator verifies it. When it does not match, you are told the correct digit instead of having it silently replaced — a mismatch usually means two digits were swapped somewhere. Code 128 always carries its own check character (modulo 103), which the generator adds and which is not printed in the text line. For Code 39 you can switch on the optional modulo 43 check character.
How large does an EAN barcode have to be?
The GS1 General Specifications define the nominal size (100%) through the module width, the width of the narrowest bar: 0.330 mm. An EAN-13 is then 37.29 mm wide including its quiet zones, with bars 22.85 mm high. Retail barcodes scanned at the checkout may range from 80% to 200%:
| Magnification | Module width | EAN-13 width | Bar height |
|---|---|---|---|
| 80% | 0.264 mm | 29.83 mm | 18.28 mm |
| 100% | 0.330 mm | 37.29 mm | 22.85 mm |
| 150% | 0.495 mm | 55.94 mm | 34.28 mm |
| 200% | 0.660 mm | 74.58 mm | 45.70 mm |
The quiet zones matter at least as much: 11 modules on the left and 7 on the right for EAN-13, 9 on each side for UPC-A, 7 for EAN-8, and at least 10 modules for Code 128 (ISO/IEC 15417), Code 39 (ISO/IEC 16388) and ITF-14. Nothing may be printed there, not even a border or text. Shortening the bars saves space but costs readability: the checkout scanner then only reads the code from a few angles.
How to create a barcode
- Pick the barcode type. The line below it tells you what it is meant for.
- Enter the number or text. For EAN, UPC and ITF-14 you can leave out the check digit.
- Set the size: through the GS1 magnification for EAN, UPC and ISBN, through the module width in millimetres for the others, plus the bar height.
- Check the colours. The generator warns about swapped colours, low contrast and red bars.
- Download: SVG for print artwork, PNG at 203 or 300 dpi for label printers.
Why does Code 128 switch code sets?
Code 128 has three code sets: A for upper-case letters and control characters, B for upper- and lower-case letters, C for pairs of digits. In set C, two digits take up a single 11-module symbol character. The generator works out the shortest possible sequence instead of following a rule of thumb and shows below the preview which sets it chose. “AB1234” therefore needs five data characters instead of six: A and B in set B, one switch character, then 12 and 34 in set C.
Characters outside ASCII, such as accented letters, are not encoded. Code 128 could only represent them through the FNC4 function character, which this tool does not support. GS1-128 with application identifiers (FNC1) is not built in either.
What should I watch out for when printing?
- Dark bars on a light background. Black on white is the safest choice. Many scanners use red light, under which red, orange and yellow bars disappear.
- Keep the quiet zones clear, including when the barcode later sits next to text or a frame.
- Do not stretch it freely. The SVG carries millimetres and the PNG its resolution. Scaling the barcode by hand in another program changes the module width.
- Scan a sample before a print run. Print quality is measured with a verifier according to ISO/IEC 15416; a screen preview and colour warning cannot replace that measurement.
Privacy
Encoding, preview and export run entirely in your browser, and nothing is uploaded. Your last input and settings are kept in your device’s local storage so the tool reopens where you left off.