Barcode Generator
Turn product numbers, SKUs, asset tags or order IDs into Code 128, EAN-13, EAN-8, UPC-A, Code 39 or ITF-14 barcodes, save them as PNG or SVG, or paste a list and print them all at once. No sign-up and no limits. Everything you type is processed in this browser and never sent to a server.
Enter a value to see the barcode preview.
Which barcode format should I use?
| Format | Allowed characters | Length | Typical use |
|---|---|---|---|
| Code 128 | Letters (both cases), digits, space, ASCII symbols | 1–80 characters | Shipping labels, SKUs, order numbers, internal inventory. The most compact general-purpose 1D code. |
| EAN-13 | Digits | 13 (12 + check digit) | Retail products in Europe, Asia and most of the world (GTIN-13). |
| EAN-8 | Digits | 8 (7 + 1) | Very small packages such as gum or batteries. |
| UPC-A | Digits | 12 (11 + 1) | Retail products in the United States and Canada (GTIN-12). |
| Code 39 | Digits, capital letters, space, - . $ / + % | 1–43 characters | Asset tags, ID badges, industrial and government labels. Readable by very old scanners. |
| ITF-14 | Digits | 14 (13 + 1) | Shipping cases and pallets (GTIN-14). Thick bars print well on corrugated cardboard. |
For codes you only use internally, on shipping labels or in your own inventory system, Code 128 is the safe choice. A product barcode that must scan at a store checkout has to be a UPC-A or EAN-13 built from an officially assigned number (see below).
Retail barcodes need a GS1-assigned number
Drawing a barcode and owning a product number are two different things. This tool will render any digits as an EAN-13 or UPC-A image, but to list a product with retailers or marketplaces the number itself must start with a company prefix licensed from GS1 (GS1 US for the United States, or your national GS1 member organization). Made-up numbers can collide with other companies' products and are rejected during product onboarding.
- Get a company prefix or single GTINs: GS1 US · other GS1 member organizations
- Once you have the number, paste the first 11 (UPC-A) or 12 (EAN-13) digits here and the check digit is added automatically.
- Amazon, Shopify and most marketplaces also accept your own SKU as a Code 128 label for warehouse use; check each channel's inbound requirements.
How the check digit is calculated (EAN-13, EAN-8, UPC-A, ITF-14)
The last digit of every GS1 number is a check digit that lets scanners detect a misread. It uses the same modulo-10 rule for all four formats:
- Starting from the rightmost digit (excluding the check digit), multiply the digits alternately by 3 and 1 and add them up.
- Subtract the remainder of that sum divided by 10 from 10. If the result is 10, the check digit is 0.
Example: 978020137962 → 2×3 + 6×1 + 9×3 + 7×1 + 3×3 + 1×1 + 0×3 + 2×1 + 0×3 + 8×1 + 7×3 + 9×1 = 96 → 10 − 6 = 4, so the EAN-13 is 9780201379624.
Enter 12 digits and the tool adds it; enter 13 and it verifies the last one. Code 128 and Code 39 carry their check characters inside the bars, so you never type them.
Printing and scanning tips
- Black bars on white are the default for a reason: red laser scanners cannot see red bars, and inverted codes (light bars on dark) fail on most readers. The tool warns you when contrast is low.
- Quiet zone: leave blank space on both sides at least 10 times the narrowest bar. The generated image includes a 10 px margin; don't crop it away in your layout.
- Size: the nominal EAN-13 / UPC-A size is 37.29 × 25.93 mm (1.469 × 1.02 in), usable from 80% to 200%. Use SVG for print so bar edges stay crisp, and a bar width of 2 px or more.
- Don't make bars too short. A scanner swept at an angle must cross every bar in one line; keep the height at 1 cm (0.4 in) or more.
- Test it with a phone camera app or a scanner before printing a batch.
If you need the code to open a web page, use the QR code generator instead. To size the image for a label printer, see the DPI and print size calculator.
Frequently asked questions
Is it free for commercial use?
Yes. The PNG and SVG files have no watermark and no limit on how many you make or where you use them. Retail product numbers still have to come from GS1 as explained above.
Are my product numbers uploaded anywhere?
No. The barcode is rendered inside your browser; the values and lists you type are never sent to or stored on a server. Only the drawing library is loaded from a CDN.
Can I encode letters or Unicode text?
Code 128 and Code 39 encode ASCII only (Code 39 is uppercase). For other characters or longer text, use a QR code.
Can I make barcodes from a spreadsheet?
Open "Make several at once", paste one value per line (up to 100) and press Make barcode. The list is rendered on the page and Print outputs only the barcodes. Layouts for specific label sheets (Avery and similar) are not supported yet.
What is the difference between UPC-A and EAN-13?
They belong to the same GS1 numbering system: a UPC-A with a leading 0 is a valid EAN-13. UPC-A is used in the US and Canada, EAN-13 elsewhere, and modern scanners read both.
Sources
- Check digit rule and EAN/UPC specifications: GS1: How to calculate a check digit, GS1 US
- Rendering: JsBarcode (MIT)
Found this useful? Share it
Only the page link is shared. Your inputs and files are never included.