Free barcode generator
Twelve symbologies, rendered in your browser, exported as PNG or SVG. No account, no watermark, and nothing you type is uploaded anywhere.
Generate a barcode
SVG shape mask (decorative)
Upload an SVG — the barcode is clipped to its shape. A horse SVG makes a horse-shaped barcode.
Which barcode format should you use?
Nearly every barcode question comes down to one decision: is this symbol going to be scanned at a retail till, or somewhere you control? If it is retail, you need an EAN or UPC number allocated to you by GS1; a generator cannot give you one, and a made-up number will be rejected or will collide with someone else's product.
For everything else — warehouse shelves, asset tags, event tickets, library stock, a label on a box you are posting — pick Code 128. It takes any ASCII text, packs digits efficiently, and needs no registration. Reach for a 2D format instead when you have more data than a line of bars can carry: Data Matrix when the label is tiny, PDF417 when you need a paragraph of text, and Aztec when the code has to work with no margin around it, such as on a phone screen at a ticket barrier.
To encode a web address, use a QR code rather than a linear barcode. Linear symbologies were designed for short identifiers, and a full URL in Code 128 produces a symbol so wide that most scanners struggle.
The supported symbologies
Each format has its own page covering its character set, length rules, check digit, real uses and a generator preset to it.
Code 128
code128 Type anything printable and get a scannable Code 128 symbol. This is the format to pick whenever the barcode is for your own system rather than a retail till.
Accepts — Variable — no limit in the standard, bounded in practice by label width
Code 39
code39 The oldest alphanumeric barcode still in daily use. Wider than Code 128 for the same data, but demanded by name in defence, automotive and a lot of older badge systems.
Accepts — Variable
EAN-13
ean13 The retail barcode used on packaged goods outside North America. Type your 12-digit article number and the thirteenth digit is computed automatically.
Accepts — 12 digits (check digit computed) or a complete 13
EAN-8
ean8 The short retail barcode, for packaging that physically cannot carry a full EAN-13. Eight digits, check digit calculated as you type.
Accepts — 7 digits (check digit computed) or a complete 8
UPC-A
upca The twelve-digit retail barcode used in the United States and Canada. Enter eleven digits and the twelfth is calculated for you.
Accepts — 11 digits (check digit computed) or a complete 12
UPC-E
upce The compressed form of UPC-A for packaging that has no room for twelve digits. Eight printed digits that a scanner expands back to a full UPC-A.
Accepts — 7 digits (check digit computed) or a complete 8
ITF-14
itf14 The barcode on the outside of a shipping case. Fourteen digits, printed with bearer bars so it survives being printed straight onto corrugated cardboard.
Accepts — 13 digits (check digit computed) or a complete 14
Interleaved 2 of 5
interleaved2of5 A dense numeric-only symbology that encodes two digits in the space most formats give one. The basis for ITF-14, and still common on cartons and film.
Accepts — Variable, but always an even number of digits
Data Matrix
datamatrix The square 2D code that still reads when it is only a few millimetres across. Standard for marking components, instruments and pharmaceutical packs.
Accepts — Up to 2,335 alphanumeric characters, 3,116 digits or 1,556 bytes
PDF417
pdf417 The stacked barcode that carries a paragraph rather than an identifier. If you have scanned the strip on a boarding pass or the back of a driving licence, you have scanned PDF417.
Accepts — Up to 1,850 text characters, 2,710 digits or 1,108 bytes
Aztec Code
azteccode The ticketing 2D code. It needs no blank margin around it, which is why it survives being printed at the very edge of a rail ticket or shown on a phone at a gate.
Accepts — Up to 3,832 digits, 3,067 letters or 1,914 bytes
QR Code (bwip-js renderer)
qrcode Available in the Barcode tab for completeness. For colours, a logo overlay, UTM tagging or SVG export, use the dedicated QR code generator on the home page instead.
Accepts — Any text or URL
Why your barcode shows an error
Unlike a QR code, a linear barcode cannot encode arbitrary data in an arbitrary format. Each symbology enforces a length and a character set, and bwip-js refuses to render something invalid rather than producing a symbol that will not scan. Almost every error message comes from one of these:
- A retail format given the wrong number of digits. EAN-13 wants 12 or 13, UPC-A 11 or 12, EAN-8 7 or 8.
- Letters in a numeric-only format. EAN, UPC, ITF-14 and Interleaved 2 of 5 accept digits only.
- An odd number of digits in Interleaved 2 of 5, which encodes digits in pairs.
- Lowercase letters in Code 39, which only knows uppercase.
- A check digit you typed yourself that does not match the one the standard computes. Leave it off and let the generator calculate it.
Printing a barcode that actually scans
Export SVG whenever the barcode will be printed. A vector file keeps the bar edges crisp at any size, while a PNG scaled up in a layout program produces soft edges that cheap laser scanners misread. Keep the code black on white: scanners threshold the image, and coloured or reversed bars are a common cause of failure.
Leave the quiet zone alone — the blank margin on each side of the symbol is part of the symbology, not decoration, and cropping it is the single most frequent reason a correctly generated barcode will not scan. Do not stretch the symbol horizontally either; narrowing the bars below the printer's resolution destroys it.
Finally, the SVG shape mask option is artwork only. Clipping the bars into a silhouette removes part of the encoded data, so a masked barcode is not readable by design. It looks excellent on a poster and it will never work at a till.
Guides
Longer reads on getting a symbol that scans off a real printer, and on the numbering rules behind the retail formats.
-
EAN-13 vs UPC-A: which one your product needs
UPC-A is an EAN-13 with a leading zero, so the real question is where your number came from. Digit counts, check digits, GS1 prefixes and the case code.
6 min read
-
Barcode or QR code, and what converting one into the other really means
A QR code is a barcode. Converting between the two means re-encoding the data, not transforming an image — and at a checkout that distinction decides it all.
5 min read
-
Data Matrix vs QR code: which 2D symbology for your label
Real module counts for the same payload in both symbologies, why Data Matrix wins on a 5 mm part, why QR wins on anything a phone scans, and a decision table.
8 min read
Ready to generate one?