How to create a barcode
- Choose the barcode typeEAN-13 or UPC-A for retail products, Code 128 for shipping and inventory, Code 39 for simple industrial labels.
- Enter the number or textFor EAN and UPC you can leave off the last digit: we calculate the check digit.
- Adjust size and colorsKeep dark bars on a light background.
- Download and testDownload the SVG for print and scan a test print with a barcode scanner or app.
Which barcode type do you need?
| Type | Characters | Typical use |
|---|---|---|
| EAN-13 | 12 digits + check digit | Retail products sold worldwide; the code on almost every product outside North America |
| UPC-A | 11 digits + check digit | Retail products in the US and Canada |
| EAN-8 | 7 digits + check digit | Very small packages where EAN-13 doesn't fit |
| Code 128 | Any keyboard character | Shipping labels, inventory, serial numbers, internal tracking |
| Code 39 | A–Z, 0–9 and - . $ / + % space | Older industrial systems, ID badges, the automotive and defense sectors |
| ITF-14 | 13 digits + check digit | Outer shipping cartons and cases (GTIN-14), printed on corrugated board |
| Codabar | 0–9 and - $ : / . + with start/stop letters A–D | Libraries, blood banks, photo labs, older logistics |
Do I need to buy barcode numbers?
For products sold in shops or on marketplaces such as Amazon, yes: EAN and UPC numbers must be licensed from GS1, the organisation that manages them, so that every product number in the world is unique. Retailers check numbers against the GS1 database. This generator draws a barcode for a number you already have; it doesn't issue numbers.
For internal use (stock, library books, asset tags, event tickets) use Code 128 with your own numbering scheme. No licence is needed.
Check digits, explained
The last digit of an EAN or UPC barcode is a check digit calculated from the others. Scanners recalculate it, so a single misread digit gets caught. The calculation weights digits alternately by 3 and 1 from the right, adds them up, and takes the number needed to reach the next multiple of 10.
Example for EAN-13 590123412345?: the weighted sum is 93, so the check digit is 7, giving 5901234123457. Enter 12 digits and we add it; enter all 13 and we verify it and tell you if a digit was mistyped.
Printing barcodes that scan
- Print size: EAN-13 is about 37.3 × 25.9 mm at 100% magnification. You can go down to 80% (about 30 × 21 mm) but no smaller for retail.
- Contrast: black bars on white work best. Red bars are invisible to most laser scanners.
- Quiet zone: keep the white space left and right of the bars clear.
- Use SVG so bars stay razor sharp; a blurry PNG can merge thin bars.
Need a 2D code instead? QR codes hold far more data and can be read by any phone camera: try the QR code generator or the bulk generator for many codes at once.
ITF-14 for shipping cartons
ITF-14 encodes a 14-digit GTIN for outer cases and pallets. The first digit is the packaging level indicator (often 1 for an inner case, 2 or 3 for larger cases), followed by the 12 digits of the product's EAN-13 without its check digit, plus a new check digit. Enter 13 digits and we calculate the 14th. ITF-14 is usually printed directly on corrugated cardboard, so use wide bars (the "Wide" bar width) and keep the white margins at both ends clear.
Codabar
Codabar is an older format still used by libraries, blood banks and photo labs. It encodes digits and the symbols - $ : / . + between start and stop letters (A, B, C or D). If you leave the letters out, we add A at both ends, the most common choice. Check which letters your scanner or library system expects.
Barcodes in bulk
For many barcodes at once, such as library cards or inventory tags, generate them one by one here, or use QR codes from the bulk generator, which can print a different code on every Avery label. Phone cameras read QR codes without a special scanner.
Test with the scanner you'll actually use
Retail checkout scanners, warehouse handhelds and phone apps differ in how forgiving they are. Print a sample at the final size and scan it with the real equipment before ordering labels in bulk. Our online scanner can read many barcode types in browsers with built-in barcode detection.
Frequently asked questions
Is this barcode generator free for commercial use?
Yes. The barcode images are free to use on products and labels. You still need licensed GS1 numbers for retail EAN/UPC codes.
What is the difference between EAN-13 and UPC-A?
UPC-A has 12 digits and is used mainly in North America; EAN-13 has 13 digits and is used worldwide. Modern retail scanners read both.
How do I calculate an EAN-13 check digit?
Enter the first 12 digits and the generator calculates it for you. Manually: multiply digits alternately by 1 and 3 from the left, add them up, and subtract the total from the next multiple of 10.
Why is my barcode invalid?
Usually the check digit doesn't match (a typo), the length is wrong, or the value contains characters the format can't encode. The error message explains which.
Which format should I use for inventory?
Code 128. It is compact, supports letters and numbers, and every scanner reads it.
Can I make a barcode with a transparent background?
Yes. Tick "Transparent background" and download the PNG or SVG.
Related free tools
Related guides
Was this page helpful?
Last updated October 27, 2026 by the QR Code Haven team. Found a problem? Tell us.
Coming soon: Pro — dynamic QR codes Waitlist
Edit where a code points after you print it, and see scan analytics (time, city, device). Your free static codes here stay free and keep working forever — Pro is an optional extra.
No spam. One email when Pro launches. Contact: hello@qrcodehaven.in