Barcode generator
A linear barcode encodes digits or characters as bars and spaces of varying width. The retail symbologies — EAN-13, ISBN-13, UPC-A, EAN-8 and ITF-14 — end in a check digit derived from the digits before it, so a scanner can tell a good read from a bad one. Code 128 and Code 39 take text as well as digits.
How to make a barcode
A retail barcode number is not something you can invent. GTINs are issued by GS1, and the first digits identify the company that owns them; printing a number you do not hold will scan, and will ring up as somebody else’s product. This generator will happily encode any valid number; whether you are entitled to use it is a separate question.
Books, cases and internal labels
An ISBN-13 is not a separate symbology. The 978 and 979 prefixes exist precisely so that a book number fits the EAN-13 system, which is why a bookshop scanner and a supermarket scanner are the same device. ISBNs are allocated by the national agency for your country, not generated, so this makes the barcode and not the number; if you are converting an ISBN-10, prefix 978, drop the old check digit and let a new one be calculated, because the two checksum algorithms are different. The small separate barcode often printed beside an ISBN is an EAN-5 price add-on and is its own symbol.
UPC-A is EAN-13 with a leading zero, so the bars are the same pattern and a UPC scans perfectly well in Europe. Its first digit is a number system indicator: 0, 6, 7 and 8 for general retail, 2 for variable-weight store items, 3 for pharmaceutical and 5 for coupons. ITF-14 goes on the outer case rather than the item, and Code 128 is what internal work should use — any ASCII, any length, a mandatory checksum, and a Set C mode that packs runs of digits two to a symbol so a serial number stays narrow.
Why a printed barcode fails to scan
Almost always resolution or contrast rather than the encoding. Print from the SVG rather than scaling a PNG up, keep the quiet zone clear on both sides, and print black on white; a coloured, shiny or transparent background defeats most scanners. Do not squeeze a barcode narrower to make it fit, because that breaks the ratio between the bars. Shorten the data instead, or accept a taller, wider symbol.
What people use it for
- A retail EAN-13 with the thirteenth digit worked out
- A North American UPC-A from eleven digits
- An ISBN-13 as the barcode a shop can scan
- A Code 128 shipping or asset label of any length
Questions
For EAN and UPC, digits are weighted alternately by one and three, summed, and the check digit is whatever brings the total to a multiple of ten. Enter the number without it and you will see the digit that gets added.
EAN-13 for retail outside North America, UPC-A inside it, EAN-8 for packages too small for either, Code 128 for anything internal, and ITF-14 for outer cases.
Yes. ISBN-13 numbers begin 978 or 979 so that they fit the EAN-13 system, and they encode exactly like any other EAN-13.
Prefix 978, drop the old check digit, and let a new one be calculated. The two check algorithms are different, so the last digit rarely stays the same.
From GS1 for retail codes, and from your country’s ISBN agency for books. They are allocated, not generated; this tool makes the barcode once you have the number.
For internal use, yes — use Code 128 or Code 39 and any scheme you like. For retail, no: an invented GTIN will scan as somebody else’s product.
UPC-A is twelve digits and is an EAN-13 with a leading zero. The bar pattern is identical, so a UPC reads correctly on a European scanner.
It is the number system: 0, 6, 7 and 8 are general retail, 2 is variable-weight store items, 3 pharmaceutical and 5 coupons.
Any ASCII character, at any length, with a mandatory checksum. That flexibility is why logistics and asset tagging use it rather than a retail symbology.
Because runs of four or more digits switch into Set C, which packs two digits into one symbol. Ten digits become seven symbols instead of twelve.
Code 128 for anything new. It takes the full ASCII set, carries a mandatory checksum, and comes out roughly half the width on numeric data because of Set C. Code 39 has no check digit and only capitals, digits and a few symbols, but almost every scanner ever built reads it, which is the one reason to pick it: an old handset somewhere in the chain.
Almost always resolution or contrast. Print from the SVG rather than scaling a PNG, keep the quiet zone clear on both sides, and use black on white; a coloured or shiny background defeats most scanners.
For laser scanning, keep the narrowest bar at about 0.33 mm or more. On screen that is roughly two pixels; in print, set the width from the physical label size. Squeezing a finished barcode sideways to make it fit a space is not the same thing: it breaks the bar ratios and it stops scanning. Shorten the data instead.
Nominal is 37.29 × 25.93 mm. Scaling down to 80% is generally safe; below that, scanning gets unreliable.
An EAN-5 price add-on. It is a separate symbol carrying a price or currency code, not part of the ISBN itself.
Press Batch and paste a column of values. Each line becomes its own barcode, and invalid lines say why.