What this generator does
It works with the two barcodes you see on retail products. EAN-13 has 13 digits and is used around the world. UPC-A has 12 digits and is common in the US and Canada.
- Type the number. Enter 12 digits for an EAN-13, or 11 for a UPC-A, and the check digit is worked out for you. Enter the full 13 or 12 digits to check a number you already have.
- Pick a size. 100% is the standard size. The results show the narrowest bar, the full width with clear space and the bar height in millimeters.
- Download the SVG. It is drawn in black on white at the exact size you chose, with the clear space on each side, ready to place in your label artwork.
Everything runs in your browser. The number you type is not sent anywhere.
You still need a real number
A barcode is only a picture of a number. This tool draws any valid number, but the number on a product you sell should be one you are licensed to use. Those come from GS1, usually through the GS1 office in your country. Each business gets a company prefix, and you add your own product numbers after it.
Numbers sold by resellers usually come from a prefix first licensed to another company, so they don't trace back to your brand in GS1's records. Before you buy numbers, check what each retailer or marketplace you sell through asks for.
How the check digit works
The last digit catches typing and scanning mistakes. GS1 calculates it the same way for EAN-13 and UPC-A.
| Step | What to do |
|---|---|
| 1 | Starting from the rightmost digit, multiply the digits by 3, 1, 3, 1 and so on |
| 2 | Add the results together |
| 3 | The check digit is what brings that sum up to the next multiple of 10 |
Worked example
Take the 12 digits 123456789012. Counting from the right, the 2, 0, 8, 6, 4 and 2 are multiplied by 3, and the 1, 9, 7, 5, 3 and 1 are multiplied by 1.
- (2 + 0 + 8 + 6 + 4 + 2) × 3 = 22 × 3 = 66
- 1 + 9 + 7 + 5 + 3 + 1 = 26
- 66 + 26 = 92. The next multiple of 10 is 100, so the check digit is 8
The full EAN-13 is 1234567890128. If someone types 1234567890127, the generator flags that the last digit should be 8.
UPC-A and EAN-13 are the same barcode
A UPC-A is an EAN-13 that starts with 0. The UPC 036000291452 and the EAN 0036000291452 have exactly the same bars. Switch the barcode type above and the leading 0 is added or removed for you.
Size and printing tips
- Start at 100%. GS1 gives the standard size as 37.29 mm wide including the clear space, with 22.85 mm tall bars and a 0.33 mm narrowest bar.
- Stay between 80% and 200%. That is the range GS1 gives for barcodes scanned at a retail checkout. Smaller is harder to scan.
- Don't cut the height. Shortening the bars makes the barcode harder to read. If you must, check with your GS1 office and test the result.
- Keep the clear space. Text, edges and folds that run into the white margin either side can stop a scan.
- Print dark bars on a light background. Black bars on white give the most contrast, which is what scanners rely on.
- Scan a proof with a phone or a store scanner before you order a full print run.
Some starting digits have a set meaning. Numbers starting 978 or 979 are for books (ISBN), and 020 to 029 are for a store's own in-store codes, not for products sold to other stores.
Next steps
Many stores scan products at the till, so they will ask for a barcode on each item along with your wholesale terms. Read how to sell wholesale to retailers, set your prices with the wholesale price calculator, and work out import costs with the landed cost calculator. Then list each product with its SKU and prices on a line sheet buyers can order from.