"We need barcodes" can mean very different things. A food producer preparing for a supermarket listing needs internationally unique retail numbers. A warehouse wants labels for shelf bins. An IT team wants asset tags for laptops. A distributor asks for a code on the outer carton, not the product. Each of those jobs has its own barcode symbology, and choosing the wrong one leads to labels that scan perfectly in the office and are rejected at the first retailer.
This guide explains the common one-dimensional barcode types, what each is for, how check digits catch typing errors, and where the numbers themselves come from. Then it walks through creating single labels or a whole batch in a browser.
Two separate questions: the number and the symbol
A barcode is just a way of drawing a value as bars that a scanner can read. The symbology (EAN-13, CODE128 and so on) defines how the value is drawn. The number is a separate matter:
- For retail products sold through shops and many marketplaces, the number must be a GTIN (Global Trade Item Number) licensed from GS1, the not-for-profit body that manages them through national member organisations. A made-up EAN will scan, but it is not unique and retailers can reject it. Check the current requirements of the retailer or marketplace you sell through.
- For internal use (stock bins, files, asset tags, tickets), you can use any values you like, as long as they are unique inside your organisation.
A barcode generator can draw any valid value; it cannot give you the right to a retail number.
The main barcode types compared
| Symbology | Characters | Length | Typical use |
|---|---|---|---|
| EAN-13 | Digits | 13 | Retail products in most of the world |
| UPC-A | Digits | 12 | Retail products, mainly USA and Canada |
| EAN-8 | Digits | 8 | Very small retail packages |
| ITF-14 | Digits | 14 | Outer cartons and cases |
| CODE128 | Full ASCII text | Variable | Shipping labels, inventory, general use |
| CODE39 | Upper-case letters, digits, a few symbols | Variable | Asset tags, older industrial systems |
| MSI | Digits | Variable | Shelf edge labels in some stores |
EAN-13 and UPC-A
These two are close relatives. A UPC-A number is effectively an EAN-13 with a leading zero, and modern retail scanners read both. EAN-13 is the default outside North America. If you sell into both markets, one GTIN normally serves both; ask your GS1 office which to print.
EAN-8
A compressed retail code for packs too small for EAN-13, such as a lip balm. EAN-8 numbers are allocated separately and sparingly, so don't simply shorten an EAN-13.
ITF-14
Interleaved 2 of 5 encodes digits in pairs and tolerates printing on corrugated cardboard. ITF-14 carries the GTIN of a trade unit, such as a case of 12, and is what warehouses scan at goods-in.
CODE128 versus CODE39
Both encode text. CODE128 supports the full ASCII range and packs digits efficiently, so for the same value it is usually much shorter than CODE39. CODE39 survives because older scanners and systems expect it and because it has no mandatory check digit. For anything new that encodes letters, CODE128 is the sensible default.
How check digits work
The last digit of EAN, UPC and ITF codes is a check digit calculated from the others. If someone mistypes one digit at a till, the check fails and the scanner or system rejects it.
For EAN-13, take the first 12 digits, multiply them alternately by 1 and 3 starting from the left, add the results, and find the amount needed to reach the next multiple of 10.
Number: 5 9 0 1 2 3 4 1 2 3 4 5
Weight: 1 3 1 3 1 3 1 3 1 3 1 3
Product: 5 27 0 3 2 9 4 3 2 9 4 15 -> sum = 83
Check digit = (10 - 83 mod 10) mod 10 = 7
Full EAN-13: 5901234123457
UPC-A uses the same idea with the weights reversed: digits in odd positions (first, third and so on) are multiplied by 3. For 03600029145, odd positions sum to 14 (×3 = 42), even positions to 16, total 58, so the check digit is 2.
Create barcodes in your browser
The Barcode Generator draws codes locally with the JsBarcode library and validates each value as you type.
- Open the Barcode Generator and choose a symbology from Barcode format.
- On the Single tab, type your value into Value to encode. For EAN-13, EAN-8, UPC-A and ITF-14 you can leave off the check digit and it is added for you; if you include it, the tool verifies it and tells you the correct digit when yours is wrong.
- Adjust Bar width, Height, Font size, Bar colour and Background, and decide whether to Show text below bars. The preview updates live.
- Click Download PNG for an image rendered at three times the preview size, or Download SVG for a vector file that stays sharp at any size.
- For many labels, open the Bulk tab, paste one value per line (up to 500), choose PNG files or SVG files, and click Download ZIP. Invalid lines are flagged in the preview and left out of the ZIP.
If your values live in a spreadsheet, open it in the CSV & Excel Viewer, copy the column, and remove any repeats with Remove Duplicate Lines before pasting.
Other ways to make barcodes
- Label printer software. Thermal label printers usually ship with design software that generates barcodes and prints directly. For daily printing at volume, this is often the best route.
- Spreadsheet barcode fonts. Installing a barcode font lets a spreadsheet display codes, but for CODE128 and EAN you still need a formula to add start, stop and check characters. It is fiddly and easy to get wrong.
- Word processors. Some versions of Microsoft Word can insert barcode fields through mail merge. Handy for mailings, less so for product artwork.
- Point-of-sale and inventory systems. Many generate and print labels for items they manage, which keeps numbers and labels in one place.
A browser generator is best when you need artwork files for packaging, a one-off batch, or codes on a machine where you can't install anything.
Printing tips and troubleshooting
Keep contrast high and colours sensible
Scanners read dark bars on a light background. Black on white is safest. Red bars are a classic mistake: many laser scanners use red light, which makes red bars nearly invisible.
Leave quiet zones
Every linear barcode needs clear space before the first bar and after the last. Don't let a box edge or text run into it.
Don't squash it
Scaling a barcode's width unevenly distorts bar ratios. Resize proportionally, and use SVG for packaging so the printer gets exact bar edges.
The scanner reads the wrong number
Usually the value itself is wrong, often a leading zero lost when the column was stored as a number in a spreadsheet. Format the column as text before copying.
Frequently asked questions
Can I make my own EAN-13 numbers?
You can generate valid-looking ones, but for selling through retailers you need numbers licensed from GS1. For internal stock, use CODE128 with your own codes instead.
Is UPC-A the same as EAN-13?
Nearly. A 12-digit UPC-A becomes a valid EAN-13 by adding a leading zero, and most modern scanners read both formats.
Which barcode should I use for internal inventory?
CODE128. It encodes letters and numbers compactly, includes a built-in checksum, and is supported by practically every scanner.
Do I need to type the check digit?
Not in our generator. For EAN-13, EAN-8, UPC-A and ITF-14 the check digit is calculated automatically if you leave it out, and verified if you include it.
Should I download PNG or SVG?
SVG for packaging and professional print, because it scales without blur. PNG for documents, spreadsheets and label software that expects an image.