Barcode Generator
Make EAN, UPC, Code 128 and ISBN barcodes with correct check digits, one at a time or as a printable label sheet.
Stock, asset and shipping labels: letters, digits and symbols.
Your barcode appears here as you type.
The PNG's X is 0.339 mm (4 dots at 300 dpi), 2.6% larger than the PDF and SVG. Choose a printer to size all three alike.
Design
Print size
A label printer's resolution puts each bar on whole dots.
Makes barcodes for products, cartons, books and stock: EAN-13, EAN-8, UPC-A, UPC-E, ITF-14, GS1-128, ISBN, Code 128 and Code 39, with Codabar, Code 93, Interleaved 2 of 5 and GS1 DataBar Omnidirectional under More types. It adds a missing check digit or says which digit is wrong, sizes the bars by the GS1 tables for where the code will be scanned, and reads each barcode back with a test reader. Make one, or up to 1,000 from a list or a sequence as a ZIP of images or an A4 or Letter label sheet. Everything happens in your browser: the values never leave your device.
Which barcode to use
- Products sold in shops — EAN-13 worldwide, UPC-A in the United States and Canada; EAN-8 and UPC-E where a pack has no room. The number comes from GS1 (below).
- Outer cases and cartons — ITF-14, printed with the bearer bars around it, or GS1-128.
- Pallets and shipments — GS1-128, whose application identifiers in brackets carry a GTIN
(01), batch(10), best-before date(15)or shipping container code(00). The encoder checks every element against GS1's rules, so a bad date or check digit is named. - Books — ISBN, entered as ISBN-10 or ISBN-13, printed as an EAN-13 with the ISBN line above it and an optional 5-digit price add-on.
- Your own stock, assets and labels — Code 128, which holds letters, digits, symbols and Western European accented letters. Code 39 holds only capitals, digits and
- . $ / + %and space, for older systems that expect it. - More types, for systems that already use them. Codabar, still used by libraries, blood banks and some couriers, holds digits and
- $ : / . +; the tool adds the start and stop character A at both ends, so a letter typed inside is refused. Code 93 holds Code 39's characters in less width and always ends with its two check characters, C and K, which scanners check and drop; small letters and other ASCII symbols switch it to full ASCII mode. Interleaved 2 of 5 holds digits in pairs: an odd count gets a leading 0, or the check digit when Add a check digit is on, and the tool says which. GS1 DataBar Omnidirectional holds a 14-digit GTIN, printed as(01)and the number; 13 digits with a correct check digit are read as a GTIN-13 with a 0 in front, other 13 digits get their check digit added, and a GTIN-8 or GTIN-12 needs zeros in front.
Scanned at picks the GS1 table the sizes come from. The X-dimension is the width of the narrowest bar; every other bar and space is a whole number of X wide, but for the wide ones of Interleaved 2 of 5 and ITF-14 (below). It starts at the table's target, and the bar height at the table's minimum for that X. Outside the table's range the tool warns but still makes the code, since it can't know every use. Quiet zones, the blank margins a scanner needs, are always added.
Printer set to a resolution (203, 300, 600 dpi) moves X to the nearest whole number of that printer's dots, at least one, and says so; a move of more than 5% is pointed out. An X inside the GS1 range stays inside it, taking the next whole dot where the nearest would fall outside: at 203 dpi, 0.264 mm becomes 3 dots (0.375 mm) rather than 2, which would drop below the minimum. The PNG, SVG, PDF and label sheet all use that X, the PNG at the printer's resolution, so every bar edge lands on a dot. With Any, the PDF and SVG print at the exact X-dimension and the PNG is made at 300 dpi: its X lands on whole pixels, kept inside the GS1 range in the same way, and the tool says how far its size is from the PDF's. Each PNG has its resolution written into the file. Print at 100%, not “Fit to page”, or the printer rescales it.
Code 39 and Codabar draw their wide bars and spaces at 3X, so they stay on whole dots with X. Interleaved 2 of 5 and ITF-14 draw theirs at 2.5X, which falls between dots when X is an odd number of them; there each wide one takes the nearest whole dots within GS1's 2.25 to 3 times X: at 3 dots per X, 8 dots rather than 7.5. The dots are the printer's, or with Any the PNG's, so the PDF matches the PNG.
Many barcodes takes values one per line, or a start, count and step. A tab splits a line into value and label, as two spreadsheet columns paste; the label prints under the code on a label sheet and names its file in the ZIP. Commas are part of the value. Lines that can't be encoded are listed by number and the rest still generate. A sequence keeps leading zeros and gives each barcode its own check digit. Label sheets come with 21, 24, 40, 65 labels each on A4, or 30, 10, 24, 80 on Letter, sized from Avery's templates, or any custom grid; each code prints at its true size, so a code too large for the label is reported rather than shrunk. Start at label leaves the labels before it empty, for a sheet already part used.
The colours must be dark bars on a light background. Most scanners read by red light, so the tool also warns about red or orange bars, which a red light can't tell from white.
How the check digit is worked out
EAN, UPC, ITF-14 and every GTIN end in a check digit that lets a scanner catch a misread. Starting from the digit next to the check digit and moving left, the digits are multiplied by 3, 1, 3, 1 and so on, and added up. The check digit is what brings that sum up to the next multiple of 10. One wrong digit, or most swaps of two neighbours, changes the sum, so the check fails.
ISBN-10 used a different check, modulo 11, whose check character can be X for 10. Converting to ISBN-13 puts 978 in front of the first nine digits and works out a new check digit the GS1 way. UPC-E is a UPC-A number with its zeros squeezed out; its check digit is the full UPC-A number's.
sum = 3 × (1st, 3rd, 5th … digit from the right) + 1 × (2nd, 4th … digit from the right)
check digit = (10 − sum mod 10) mod 10
Examples
An EAN-13 check digit
- Number
- 590123412345
- Weights
- 1 3 1 3 1 3 1 3 1 3 1 3
- Products
- 5 + 27 + 0 + 3 + 2 + 9 + 4 + 3 + 2 + 9 + 4 + 15
- Sum
- 83
- Barcode number
- 5901234123457
83 needs 7 to reach the next multiple of 10, so the check digit is 7. Type the 12 digits and the tool adds it; type all 13 with another last digit and it says which digit it should be.
An ISBN-10 as a book barcode
- ISBN
- 0-306-40615-2
- Barcode number
- 9780306406157
The ISBN-10 check digit 2 is checked first, then dropped: 978 goes in front of the other nine digits and a new GS1 check digit goes on the end.
A UPC-E number and the UPC-A it stands for
- Barcode type
- UPC-E
- Number
- 0123456
- Barcode number
- 01234565
- As UPC-A
- 012345000065
The last of the six digits says how the zeros were removed: from 5 to 9, it is the product number's last digit, after four zeros that were taken out. Many scanners report the UPC-A form, which is why a UPC-E barcode often reads back as 12 or 13 digits. A number starting 1 is still made, with the warning “ GS1 issues UPC-E numbers with number system 0 only.” and six digits that GS1 writes another way get a warning naming its form.
What each type holds, and GS1 print sizes
| Barcode | Characters | Length | Check character |
|---|---|---|---|
| Code 128 | Western European (Latin-1) letters, digits and symbols | Any | Mod 103, always |
| EAN-13 | Digits | 13 | GS1 mod 10 |
| EAN-8 | Digits | 8 | GS1 mod 10 |
| UPC-A | Digits | 12 | GS1 mod 10 |
| UPC-E | Digits | 8, from a 12-digit UPC-A | GS1 mod 10 |
| ITF-14 | Digits | 14 | GS1 mod 10 |
| GS1-128 | GS1 application identifiers and their values | Any | Mod 103, always |
| ISBN | Digits, from an ISBN-10 or ISBN-13 | 13 | GS1 mod 10 |
| Code 39 | A–Z, 0–9, space and - . $ / + % | Any | Mod 43, optional |
| Codabar | 0–9 and - $ : / . +, between start and stop characters A | Any | None |
| Code 93 | Code 39's characters; any ASCII text in full ASCII mode | Any | Two, C and K, always |
| Interleaved 2 of 5 | Digits | An even count | GS1 mod 10, optional |
| GS1 DataBar Omnidirectional | A GTIN | 14 | GS1 mod 10 |
| Barcode | Scanned at | X min (mm) | X target (mm) | X max (mm) | Min height at target X (mm) | Quiet zones (left / right) |
|---|---|---|---|---|---|---|
| EAN-13 | Shop checkout (table 1) | 0.264 | 0.330 | 0.660 | 22.85 | 11X / 7X |
| EAN-13 | Shop checkout and warehouses (table 3) | 0.495 | 0.660 | 0.660 | 45.70 | 11X / 7X |
| EAN-13 | Warehouses only (outer cases) (table 2) | 0.495 | 0.660 | 0.660 | 45.70 | 11X / 7X |
| UPC-A | Shop checkout (table 1) | 0.264 | 0.330 | 0.660 | 22.85 | 9X / 9X |
| UPC-A | Shop checkout and warehouses (table 3) | 0.495 | 0.660 | 0.660 | 45.70 | 9X / 9X |
| UPC-A | Warehouses only (outer cases) (table 2) | 0.495 | 0.660 | 0.660 | 45.70 | 9X / 9X |
| UPC-E | Shop checkout (table 1) | 0.264 | 0.330 | 0.660 | 22.85 | 9X / 7X |
| UPC-E | Shop checkout and warehouses (table 3) | 0.495 | 0.660 | 0.660 | 45.70 | 9X / 7X |
| UPC-E | Warehouses only (outer cases) (table 2) | 0.495 | 0.660 | 0.660 | 45.70 | 9X / 7X |
| EAN-8 | Shop checkout (table 1) | 0.264 | 0.330 | 0.660 | 18.23 | 7X / 7X |
| EAN-8 | Shop checkout and warehouses (table 3) | 0.495 | 0.660 | 0.660 | 36.46 | 7X / 7X |
| ITF-14 | Warehouses only (outer cases) (table 2) | 0.495 | 0.495 | 1.016 | 31.75 | 10X / 10X, inside the bearer bars |
| GS1-128 | Warehouses only (outer cases) (table 2) | 0.495 | 0.495 | 1.016 | 31.75 | 10X / 10X |
| GS1-128 | Pallets and shipments (logistic units) (table 5) | 0.495 | 0.495 | 0.940 | 31.75 | 10X / 10X |
| GS1 DataBar Omnidirectional | Shop checkout (table 1) | 0.264 | 0.330 | 0.660 | 15.19 | None |
| GS1 DataBar Omnidirectional | Shop checkout and warehouses (table 3) | 0.495 | 0.660 | 0.660 | 30.36 | None |
| GS1 DataBar Omnidirectional | Warehouses only (outer cases) (table 2) | 0.495 | 0.660 | 0.660 | 21.78 | None |
Where the numbers and sizes come from
The sizes are copied from the symbol specification tables of the GS1 General Specifications, §5.12.3: table 1 (Table 5-44) for trade items scanned in general retail POS and not general distribution; table 3 (Table 5-48) for trade items scanned at general retail POS and general distribution; table 2 (Table 5-47) for trade items scanned in general distribution only; table 5 (Table 5-51) for logistic units scanned in general distribution. Heights exclude the text under the bars, and for EAN and UPC they scale with X between the figures the tables give. An add-on sits 9X after its main symbol, within the 7X to 12X the tables allow, and ends with a 5X quiet zone. GS1 DataBar Omnidirectional is 46X high wherever it crosses a shop's checkout scanner, above its 33X minimum, as the tables' note asks for omnidirectional scanning. ITF-14 and Interleaved 2 of 5 print their wide bars at 2.5 times the narrow ones, GS1's target for ITF-14 (§5.3.2.2), or the nearest whole printer dots within its 2.25 to 3. Healthcare tables are not offered.
A barcode number for trade is unique only when it comes from GS1: a business joins its national GS1 organisation and is given a GS1 Company Prefix, from which it numbers its products. GS1 Australia warns that numbers bought from resellers are no longer managed by GS1, so there is no guarantee they stay unique. In India, GS1 India is the only authorised provider of numbers starting with 890. The tool checks that a number's check digit is correct; it can't check that the number was issued to you.
Sources
- GS1 General Specifications, Release 26.0 (January 2026), §5.12.3 — GS1
- How to obtain a GS1 Company Prefix? — GS1
- Barcode Standards FAQs — GS1 Australia
- Get a barcode — GS1 India
Reviewed
Frequently asked questions
See also
- QR Code Generator — for a QR code holding a link, text, contact card or Wi-Fi details.
- Bulk QR Code Generator — for QR codes from a spreadsheet, on the same label sheets.
- QR & Barcode Scanner — to read a printed barcode with your camera, add-on included.
- Check Digit Calculator — to see how a check digit is worked out, or check a list of numbers.
- Data Matrix Generator — for Data Matrix, PDF417 and Aztec codes, GS1 data in a small square included.