What this tool does
This EAN-13 barcode generator turns a 12-digit number into a scannable retail barcode, adds the check digit, and lets you download the result as SVG or PNG. Type all thirteen digits and it checks the last one instead, telling you what it should have been if it is wrong. Everything is calculated in your browser; no number is sent anywhere.
The encoder is written against the GS1 General Specifications, not borrowed from a library: the left half uses the L and G code sets in the parity pattern chosen by the first digit, the right half uses the R set, the three guard patterns extend below the other bars, and the symbol keeps the standard quiet zones of 11 modules on the left and 7 on the right.
How to use it
- Type or paste the number. Spaces and hyphens are ignored, so you can copy it straight from a spreadsheet or a label.
- With 12 digits, the tool works as an ean 13 check digit calculator and appends the result. With 13, it validates the check digit you supplied.
- Choose the bar height, the size in pixels per module, and whether the digits are printed underneath.
- Download the ean-13 barcode svg for print and layout software, or the PNG for anything that only accepts bitmaps.
A barcode is not a registration
This is the part most people learn the expensive way. The barcode is only a picture of the number; the uniqueness of a gtin-13 barcode comes from GS1, the organisation that allocates company prefixes. When you license a prefix from your national GS1 office, every number you build from it is guaranteed not to clash with anyone else's product. Numbers bought from resellers or made up on the spot carry no such guarantee, and marketplaces increasingly reject listings whose GTIN does not belong to the brand selling the product.
Some ranges are legitimate without a licence, but only inside your own walls. Prefixes 20 to 29 are reserved for in-store use, such as variable-weight items priced at the deli counter, and are never unique outside the shop that printed them. Books use 978 and 979, the Bookland prefix that turns an ISBN into an EAN-13, and periodicals use 977 for the ISSN.
Getting it to scan
A barcode that reads on screen can still fail on the shelf. Print in black on white or on a pale background; red bars are invisible to the red light most scanners use. Keep the white margins either side — cropping the quiet zones is the commonest cause of a symbol that reads on some scanners and not others. Scale the whole barcode rather than stretching one dimension, and print a test at 100% before committing to a run of labels.
Related tools
Need unique identifiers for internal stock records rather than retail products? The UUID generator creates them without any registry. To fingerprint a file of product data before sending it on, use the hash generator.