Skip to content
CornerTools

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.

Make

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

What each barcode type holds
BarcodeCharactersLengthCheck character
Code 128Western European (Latin-1) letters, digits and symbolsAnyMod 103, always
EAN-13Digits13GS1 mod 10
EAN-8Digits8GS1 mod 10
UPC-ADigits12GS1 mod 10
UPC-EDigits8, from a 12-digit UPC-AGS1 mod 10
ITF-14Digits14GS1 mod 10
GS1-128GS1 application identifiers and their valuesAnyMod 103, always
ISBNDigits, from an ISBN-10 or ISBN-1313GS1 mod 10
Code 39A–Z, 0–9, space and - . $ / + %AnyMod 43, optional
Codabar0–9 and - $ : / . +, between start and stop characters AAnyNone
Code 93Code 39's characters; any ASCII text in full ASCII modeAnyTwo, C and K, always
Interleaved 2 of 5DigitsAn even countGS1 mod 10, optional
GS1 DataBar OmnidirectionalA GTIN14GS1 mod 10
X-dimension range, minimum bar height and quiet zones, from the GS1 General Specifications (Release 26.0)
BarcodeScanned atX min (mm)X target (mm)X max (mm)Min height at target X (mm)Quiet zones (left / right)
EAN-13Shop checkout (table 1)0.2640.3300.66022.8511X / 7X
EAN-13Shop checkout and warehouses (table 3)0.4950.6600.66045.7011X / 7X
EAN-13Warehouses only (outer cases) (table 2)0.4950.6600.66045.7011X / 7X
UPC-AShop checkout (table 1)0.2640.3300.66022.859X / 9X
UPC-AShop checkout and warehouses (table 3)0.4950.6600.66045.709X / 9X
UPC-AWarehouses only (outer cases) (table 2)0.4950.6600.66045.709X / 9X
UPC-EShop checkout (table 1)0.2640.3300.66022.859X / 7X
UPC-EShop checkout and warehouses (table 3)0.4950.6600.66045.709X / 7X
UPC-EWarehouses only (outer cases) (table 2)0.4950.6600.66045.709X / 7X
EAN-8Shop checkout (table 1)0.2640.3300.66018.237X / 7X
EAN-8Shop checkout and warehouses (table 3)0.4950.6600.66036.467X / 7X
ITF-14Warehouses only (outer cases) (table 2)0.4950.4951.01631.7510X / 10X, inside the bearer bars
GS1-128Warehouses only (outer cases) (table 2)0.4950.4951.01631.7510X / 10X
GS1-128Pallets and shipments (logistic units) (table 5)0.4950.4950.94031.7510X / 10X
GS1 DataBar OmnidirectionalShop checkout (table 1)0.2640.3300.66015.19None
GS1 DataBar OmnidirectionalShop checkout and warehouses (table 3)0.4950.6600.66030.36None
GS1 DataBar OmnidirectionalWarehouses only (outer cases) (table 2)0.4950.6600.66021.78None

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

Reviewed

Frequently asked questions

Not for your own stock, assets or shelf labels: any Code 128 or Code 39 value works inside your business. To sell through shops or online marketplaces, the EAN or UPC number must be one issued to you through GS1. The barcode image itself costs nothing; this tool makes it from the number.
For shop checkout, GS1 allows an EAN-13 X-dimension down to 0.264 mm, with bars at least 18.28 mm high at that size. Smaller codes scan less reliably, and bars should never be cut shorter to fit a pack. Keep the quiet zones clear of other print.
Usually it is the same number in another form. Many scanners report UPC-A as 13 digits with a leading 0, UPC-E as the UPC-A number it stands for, and a Code 39 check character as part of the text unless set to drop it. Scanners can also be set to leave out the check digit or add-on. If the digits truly differ, the code was printed too small, too faint or without its quiet zones.
Yes, with no licence or fee. DENSO WAVE, which invented the QR code, states that it can be used freely as long as it follows the JIS or ISO standards. "QR Code" is a registered trademark of DENSO WAVE INCORPORATED in Japan and other countries.

See also