Developer Barcodes

Barcode generator

Value
Twelve digits and the thirteenth is calculated for you, or paste all thirteen to have it checked. The retail barcode used everywhere outside North America, and the one a book carries: an ISBN-13 starting 978 or 979 is an EAN-13.
9 780201 379624
Encoded 9780201379624 · 95 modules · check digit 4
Live · check digit calculated and validated

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

1 Choose the symbology. The hint underneath says what it accepts and how long the value has to be.
2 Type the value. The check digit is calculated for you, or validated if you supply it.
3 Set the bar width and height for your label, then download SVG for print or PNG for a screen.
4 Use Batch for a column of values, which gives one barcode per line.

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.

GS1, general specificationsISO/IEC 15417, Code 128 bar code symbology specification
Was this tool any good?
Internal signal only · I use it to find the tools worth rebuilding