Calci.inCalculate Today for a Better Tomorrow

Bulk Barcode Generator

Code 128, EAN-13, UPC and more, many at once

The guide

Barcode formats, check digits and printing them right

Which barcode format suits which job, how the GS1 check digit is worked out, where a retail number has to come from, and the print sizes that scan.

Last reviewed · 1,682 words

In short

  • Use Code 128 with your own reference for shelves, bins and asset tags. Keep EAN-13, UPC-A, EAN-8 and ITF-14 for GS1 numbers you have licensed.
  • In India, retail GS1 numbers start with 890 and are issued by GS1 India. A made-up EAN is for use inside your own business only.
  • The check digit brings the 3-1 weighted sum up to the next multiple of 10. It catches any single wrong digit, but not two neighbouring digits that differ by 5 swapped round.
  • An ITF-14 carton code gets a new check digit. It is not the EAN-13 with a digit added in front.
  • Choose the printer resolution first, so each bar is a whole number of dots, then print at 100% scale rather than fit to page.
  • Measure one printed code with a ruler and scan it on the device that will read it before printing the run.

You have a list of stock codes, product numbers or carton numbers, and you need barcodes a scanner will read. That depends on three things: the format, whether the number is valid, and whether the bars are printed at the right size.

Which format fits which job

Code 128 and Code 39 hold your own text, such as a SKU. EAN-13, UPC-A, EAN-8 and ITF-14 hold GS1 numbers: a fixed count of digits ending in a check digit.

FormatHoldsUse it forQuiet zone, in bar widths
Code 128Keyboard characters, up to 80 hereSKUs, bin labels, asset tags10 each side
Code 39Capitals, digits, space and - . $ / + %, up to 80 hereOlder systems that ask for it10 each side
EAN-1313 digitsRetail products11 left, 7 right
UPC-A12 digitsRetail products sold in the USA or Canada9 each side
EAN-88 digitsPacks too small for an EAN-137 each side
ITF-1414 digitsOuter cartons that never pass a shop till10 each side

The quiet zone is the blank margin that tells a scanner where the code starts, so keep borders and text out of it. The figures are GS1's, and ISO/IEC 16388's for Code 39; for Code 128 the tool uses GS1's figure for GS1-128. If the code only has to work inside your own business, Code 128 with your existing reference is the simpler choice.

Where a retail number has to come from

The bars are free to draw; the number is not. GS1's rules say a licence, Company Prefix or individual number must not be sold, leased or given to another company.

GS1 India says Indian GS1 numbers start with 890, that it has the exclusive right to issue them, and that businesses selling through retail chains or e-marketplaces must get GS1 barcodes. It says it appoints no agents or intermediaries. Its Terms of Use grant a non-transferable licence that is renewed each year, and say "890 with barcode" is protected under the Trade Marks Act, 1999, with a penalty of ₹10,000 for a lapsed or cancelled subscriber and ₹20,000 for someone who never registered, plus costs and compensation.

A number you make up may already belong to someone else's product, so use it only inside your own business. GS1 reserves some prefixes: 04 for restricted circulation within a company, 952 for demonstrations and examples, and 978–979 for books. A correct check digit shows that a number is well formed, not who owns it.

Working out the GS1 check digit

Every fixed-length GS1 number ends in a check digit calculated the same way. Take the digits before it and, starting from the rightmost, multiply by 3, 1, 3, 1 and so on leftwards. Add the products, then:

check digit = (10 − (sum mod 10)) mod 10

For 400638133393:

4×1 + 0×3 + 0×1 + 6×3 + 3×1 + 8×3 + 1×1 + 3×3 + 3×1 + 3×3 + 9×1 + 3×3 = 89

The next multiple of ten is 90, so the check digit is 1 and the full EAN-13 is 4006381333931. GS1's own worked example, 629104150021, sums to 57 and gets a 3.

Any single wrong digit is always caught. Weights 1 and 3 share no factor with 10, so changing one digit never moves the sum by a multiple of 10. Swapping two neighbouring digits moves it by twice their difference, which is a multiple of 10 when they differ by 5. So 4006831333931, with the 3 and 8 swapped, passes, while 4003681333931, with the 6 and 3 swapped, fails: the tool says the last digit should be 7.

One algorithm across four formats

The weights count from the right, so a 0 in front changes nothing. The UPC-A 036000291452 and the EAN-13 0036000291452 share a check digit, and EAN-13 numbers starting with 0 are reserved for UPC numbers.

FormatYou enterWeighted sumTool addsFull number
UPC-A03600029145582036000291452
EAN-8963850786496385074
ITF-14154001412887697315400141288763

Enter a number one digit short and the tool adds the check digit; enter it in full and it is checked. The trap is a whole UPC-A pasted under EAN-13, or a number whose leading 0 Excel dropped: it gains a digit it should not have. When a short number already ends in a valid check digit, the tool says it may be complete; about one in ten does so by chance. A number Excel shows as 8.90123E+12 is refused: format the column as Number with 0 decimal places.

An ITF-14 carton code gets a new check digit. It is the packing indicator (1 to 8), the first 12 digits of the EAN-13, then a fresh check digit. Indicator 1 on 4006381333931 gives 1400638133393, which sums to 92, so the carton code is 14006381333938, ending in 8, not 1.

Bar width and printer dots

The narrowest bar is the X-dimension, and everything else in the symbol is a multiple of it. GS1's retail figures for EAN-13:

EAN-13MinimumNominalMaximum
X-dimension0.264 mm0.330 mm0.660 mm
Bar height18.28 mm22.85 mm45.70 mm
Width with quiet zones29.83 mm37.29 mm74.58 mm

The width is 113 × X. The tool scales the height with minimum height = 22.85 × X ÷ 0.330, which reproduces all three heights. GS1 allows 0.249 to 0.264 mm only for on-demand printing on thermal or laser printers.

A printer cannot draw part of a dot, so each bar is a whole number of dots: X = dots × 25.4 ÷ DPI.

PrinterDots per barXEAN-13 bar height the tool sets
203 DPI30.375 mm26 mm
300 DPI40.339 mm23.5 mm
600 DPI80.339 mm23.5 mm

At 203 DPI, 2 dots would be 0.250 mm, inside the on-demand band but under the general minimum, so the tool uses 3 and raises the height to 25.99 mm, rounded up to 26. Choose the printer resolution first, because the bar width, the height and the file all follow from it.

Cutting the bars short

Release 26.0 of the GS1 specification, the current published edition, does not allow EAN/UPC bars below the minimum height for the X-dimension used. A change ratified in June 2026 (GSCN 26-144, going into Release 27.0) allows truncation for items scanned at a general retail till and not in general distribution, but not by more than 60% of that minimum height, only when a full-height symbol is impossible, and with the tallest possible bars printed.

The tool starts at the full GS1 height and warns, rather than blocks, below it. If you truncate, test the code on the till scanner that will read it. For Code 39, ISO/IEC 16388 recommends at least 5.0 mm or 15% of the symbol's width, whichever is greater.

ITF-14 on outer cartons

GS1's figures for ITF-14 are an X-dimension from 0.495 mm to 1.016 mm, bars at least 31.75 mm tall, and bearer bars unless they cannot be printed. The sources conflict on the target X: GS1's specification table gives 0.495 mm, while a worked example in the same document uses 1.016 mm.

The width, quiet zones included, is W = (P(4N + 6) + N + 6)X + 2Q, with 7 character pairs. At 300 DPI the tool uses X = 0.508 mm (6 dots), N = 3 and Q = 10X: (7 × 18 + 9) × 0.508 + 10.16 = 78.74 mm.

Code 128 or Code 39 for your own labels

A Code 128 character is 11 bar widths, the stop 13, and digits pack two to a character. SKU-1001 is start, S, K, U, -, a switch to digits, 10, 01, check character and stop: 11 + 44 + 11 + 22 + 11 + 13 = 112. With 10 each side that is 132 × 0.254 mm = 33.53 mm at 300 DPI. The check character, (Σ value × weight) mod 103, is added for you.

Each Code 39 character has 5 bars and 4 spaces, 3 of them wide, with a gap between characters and a * at each end. ISO/IEC 16388 gives W = (C + 2)(3N + 6)X + (C + 1)I + 2Q. For the same 8 characters as the tool draws them (N = 3, gap = X, Q = 10X), W = 150X + 9X + 20X = 179X, or 45.47 mm. The same label comes out about 12 mm wider in Code 39. It has no small letters; the tool turns them into capitals.

Neither format can hold Hindi or other Indian-script text. For a web address, a QR code is the usual choice.

Printing at true size and testing the scan

PNGs carry their resolution and SVGs state their size in millimetres, so Word and label software place them at the size shown. An EAN-13 at the tool's usual 300 DPI size measures 39.96 × 28.70 mm, digits and margins included.

  1. Print one code on the real printer and label stock, at 100% scale, not fit to page.
  2. Measure it. A different width means something scaled it.
  3. Scan it with the device that will read it in use, not only a phone.
  4. Check that the digits returned match your list, check digit included.

Only then print the rest.

What this tool assumes

  • It draws barcodes and does not issue numbers. It cannot tell whether a number is licensed, and makes no claim that a retailer or marketplace will accept a code.
  • Up to 500 codes per run; later lines can be loaded for the next run.
  • Sizes start at the GS1 figures for the format; sizes outside GS1 or ISO figures bring a warning, not a block.
  • One quiet-zone number covers both sides.
  • Code 128 and Code 39 take printable keyboard characters only, up to 80.
  • The print sheet uses the browser's print dialog, with 10 mm margins, 5 mm gaps and no label-sheet layouts.
  • EAN-13, UPC-A, EAN-8 and ITF-14 output was decoded back in testing; Code 128 and Code 39 were checked for size and quiet zone only.
  • Nothing is uploaded; your list stays on your device.

Sources

Frequently asked questions

Can I make up my own EAN-13 or UPC number for a product I sell?

Not for products sold in shops or online. Those numbers are licensed by GS1: in India, GS1 India issues them, and they start with 890. GS1 India says businesses selling through retail chains or online marketplaces need GS1 numbers. A number you make up may already belong to someone else's product, so use one only inside your own business, for example on stock-room shelves. This tool draws barcodes; it does not issue numbers.

What is the check digit, and how is it worked out?

It is the last digit of an EAN-13, EAN-8, UPC-A or ITF-14 number, and it lets a scanner catch a misread. Take the digits before it and multiply them by 3 and 1 in turn, starting with 3 on the rightmost digit. Add the results; the check digit is what brings the total up to the next multiple of 10. For 400638133393 the total is 89, so the check digit is 1 and the full number is 4006381333931. Paste a number without its last digit and the tool adds it; paste the full number and the tool checks it.

Which barcode format should I choose?

Code 128 for stock codes, SKUs and asset tags: it holds letters, digits and symbols and stays compact. Code 39 only if an older system asks for it: capitals, digits and a few symbols, and it prints wider. EAN-13 for retail products, or UPC-A if you sell in the USA or Canada. EAN-8 for packs too small for an EAN-13. ITF-14 for outer cartons of a product that already has an EAN-13.

Why was one of my lines rejected?

Each rejected line is listed with its reason. The usual ones are a wrong check digit, the wrong number of digits, or a character the format cannot hold, such as a * or # in Code 39 or Hindi text in any format. A number like 8.90123E+12 means Excel shortened it: format the column as Number with 0 decimal places, then save the file again. Excel also drops a 0 at the front of a number, which the tool points out when it can.

What size should I print the barcodes at?

Choose your printer's resolution first, so each bar is a whole number of printer dots and prints sharp. GS1 sets EAN-13 at 0.330 mm bars and 22.85 mm tall at full size. It allows bars from 0.264 mm to 0.660 mm, and down to 0.249 mm only for on-demand printing, such as on a thermal or laser printer; the tool tells you when a size falls outside these. The PNGs carry their resolution, so print them at 100% scale, not 'fit to page'. Always test-scan one code before printing a full run.

Is my list uploaded, and how many barcodes can I make?

Nothing is uploaded: the barcodes are drawn in your browser, so the list stays on your device. Up to 500 are made at a time. For a longer list, download or print the first 500, then press 'Move on to the next lines' for the rest. The ZIP names each PNG with its position and value, such as 001-SKU-1001.png, so the files stay in list order.