Barcode Generator
Create EAN, UPC, Code 128 and Code 39 barcodes — download SVG or PNG, no watermark.
Create EAN, UPC, Code 128, Code 39 and more — customise the size, colors and text, then download a clean PNG or scalable SVG with no watermark. Free. No sign-up. Runs in your browser, nothing is uploaded.
any ASCII — logistics
Pick a symbology, type your value, and the barcode renders live. Adjust bar width (1–6 px), height (40–200 px), the human-readable text and the colors, then download a PNG or a scalable SVG without a watermark. For EAN, UPC and ITF-14 you can leave off the last digit and the generator works out the check digit for you.
Which barcode type do you need?
| You're labelling… | Use | Accepts |
|---|---|---|
| A product sold in shops outside North America | EAN-13 | 12 digits + check digit |
| A small retail pack with no room for EAN-13 | EAN-8 | 7 digits + check digit |
| A product for US or Canadian retail | UPC-A | 11 digits + check digit |
| Shipping cartons and outer cases | ITF-14 | 13 digits + check digit |
| SKUs, order numbers, serials with letters | Code 128 | any ASCII text |
| Asset tags and badges for older scanners | Code 39 | A–Z, 0–9, space, - . $ / + % |
| Warehouse shelf labels | MSI | digits only |
| Pharmaceutical packaging | Pharmacode | a number from 3 to 131070 |
If nothing forces a retail standard, Code 128 is the sensible default: it's compact, handles letters and digits, and almost every scanner reads it. When you need to fit a whole URL or a block of text, a 1D barcode is the wrong tool; use the QR Code Generator.
How the EAN-13 check digit is calculated
The check digit lets a scanner spot a misread. To calculate it, take the first 12 digits, multiply them alternately by 1 and 3 from the left, and add everything up. The check digit is whatever brings the total to the next multiple of 10.
Worked through for 590123412345:
- Digits in positions 1, 3, 5…: 5 + 0 + 2 + 4 + 2 + 4 = 17
- Digits in positions 2, 4, 6…: (9 + 1 + 3 + 1 + 3 + 5) × 3 = 22 × 3 = 66
- Total 83 → next multiple of 10 is 90 → check digit 7
The full code is 5901234123457, which is exactly what the generator produces from those 12 digits. UPC-A and EAN-8 use the same idea. A wrong check digit is why a value of the right length can still show as invalid: one transposed pair of digits almost always breaks it.
Mistakes that make a barcode unscannable
- Cropping the white margin. Scanners need a clear quiet zone on both sides. The generator adds a 10 px margin, but EAN-13 expects 11 bar-widths of white on the left and 7 on the right, so at 2 px bars it wants 22 px on the left. Leave extra white space around the code in your layout.
- Stretching a PNG. Scaling a raster barcode to a size that isn't a whole multiple blurs the bar edges. Use the SVG for print, or export the PNG at the size you'll actually use.
- Light bars or a busy background. Scanners read contrast. Dark bars on white or a very light background are safest; red bars are a classic trap, because many scanners use red light and red bars disappear.
- Shrinking too far. If bars start to merge, go up a bar width or print larger. A standard EAN-13 at 100% size is 37.29 mm wide including its quiet zones.
- Lowercase in Code 39, umlauts in Code 128. Code 39 has no lowercase letters, and Code 128 only covers ASCII, so
ä,éor€won't encode.
Scan the finished code with a phone before you print a batch. A barcode that looks fine but doesn't scan is worse than none.
Retail barcodes need a real number
The generator draws any valid EAN or UPC you type, but it can't give you one. Retailers expect a GTIN registered to your company through GS1, the organization that manages these numbers. Inventing a number risks colliding with someone else's product. Inside your own warehouse, shop or library, where only your own scanners see the codes, use Code 128 with your own numbering scheme and skip GS1 entirely.
To fill a label layout with placeholder values before the real numbers exist, the Fake Data Generator can produce sample codes.
Styling without breaking it
- Bar width sets the narrowest bar in pixels (1–6). Two or three pixels is a good starting point for screens and PNG output.
- Height (40–200 px) mostly affects how easy the code is to hit with a handheld scanner; taller is more forgiving.
- Human-readable text under the bars can be switched off, and the gap to the bars adjusted (0–20 px). Keep it on for retail codes, since cashiers type it in when a scan fails.
- Colors are free to choose, but keep a strong dark-on-light contrast. Inverted, light-on-dark codes are not read by every scanner.
Downloads are named after the symbology, such as barcode-ean13.svg, and contain only the barcode, nothing else.
Frequently asked questions
Related tools
All Generators tools →- QR Code GeneratorTurn any link or text into a QR code — customise the colors and download a crisp PNG.
- Password GeneratorGenerate strong, random passwords right in your browser — your passwords never leave your device.
- Random Number GeneratorGenerate random whole numbers in any range — set a minimum, maximum and count, with options for unique (no repeats) and sorted results.
