Skip to content

Barcode Generator

EAN, UPC, Code 128 and ITF, printed at true size.

Written and maintained by Mohit PatelLast checked August 4, 2026How we build these
Barcode type

Retail products outside North America. 12 digits, the 13th is calculated.

5 901234 123457

EAN-13, 95 modules, 31.4 mm wide before the quiet zone. Encoding 5901234123457.

How the Barcode Generator works

Six symbologies covering retail, shipping and warehouse use, drawn as vector at real millimetre dimensions so a printed symbol is the size the settings say. Check digits are calculated as you type. Batch mode turns a list of codes into a sheet you can print and cut, which is the part most free generators leave out.

Also known as: EAN-13 barcode generator · UPC barcode maker · Code 128 generator · free barcode creator · barcode label sheet printer · ITF-14 case code generator

Choosing the right symbology

The choice is determined by where the barcode will be scanned, not by preference. EAN-13 is the retail standard across most of the world and encodes thirteen digits. UPC-A is the North American equivalent with twelve, and the two are the same underlying system: a UPC-A is an EAN-13 with a leading zero, and the bars are identical.

Code 128 is the workhorse for everything that is not a retail till. It encodes the full printable ASCII set at any length, packs pairs of digits into single symbols so numeric data stays compact, and is what shipping labels, carrier tracking numbers and Amazon FNSKU labels use.

The remainder are narrower. EAN-8 exists for packages too small for a full EAN-13 and should not be used otherwise, since it consumes a separate number allocation. ITF-14 goes on outer cases and cartons, encoding the case-level GTIN. Code 39 predates Code 128, encodes less in more space, and survives because older warehouse and government systems require it.

The check digit, and what it is for

The last digit of an EAN, UPC or ITF code is not part of the identifier. It is calculated from the preceding digits using a fixed weighting, alternating three and one from the right, summed, and subtracted from the next multiple of ten.

Its purpose is error detection at the scanner rather than anywhere else. A single misread digit changes the sum and the check fails, so the scanner rejects the read and beeps again rather than recording the wrong product. It catches every single-digit error and most transpositions of adjacent digits.

Which is why this generator calculates it rather than accepting it. Entering twelve digits produces the thirteenth; entering all thirteen verifies it and refuses the code if it is wrong. A barcode printed with an incorrect check digit will not scan at all, and discovering that after a print run of labels is an expensive way to learn the rule.

Where the numbers have to come from

For retail, a GTIN is licensed from GS1, the organisation that administers the numbering system globally. The prefix you are issued identifies you as the brand owner, and the numbers after it are yours to allocate across your products.

Resold barcodes are widely available and considerably cheaper, and they carry a real problem: the prefix belongs to whoever originally licensed it. Retailers and marketplaces increasingly verify GTINs against the GS1 registry, and a code whose registered owner is a company in another country gets rejected. Amazon has enforced this for several years.

For internal use none of that applies. A warehouse scanner reading Code 128 does not care where the number came from, so internal SKUs, bin locations, work orders and asset tags can use any scheme you like. The distinction is between identifying a product to the outside world and identifying it to yourself.

Size, and the reason it is regulated

The bar width, called the X dimension, determines everything else. GS1 specifies a nominal 0.33 mm for retail symbols, with a permitted range from 0.264 to 0.660 mm, which puts a nominal EAN-13 at roughly 37.3 mm wide and 25.9 mm tall.

The lower bound exists because scanners have a resolution limit. Below 0.264 mm a checkout scanner is not obliged to read the symbol, and in practice many will not, which produces the situation where a product scans at one shop and not another.

Height matters less than width and is not decorative. A truncated barcode is harder to scan because the operator has to align the beam more precisely, which slows a checkout and increases failed reads. Reducing height to fit a design is the most common compromise made and the one most likely to cause complaints later.

The quiet zone

The clear space either side of the bars is part of the symbol, not a margin around it. A scanner uses it to find where the code begins and ends, and without it the reader cannot distinguish the first bar from whatever is printed next to it.

EAN-13 requires eleven modules of quiet zone on the left and seven on the right; UPC-A requires nine on each side. At the nominal bar width that is a few millimetres, and it is routinely lost when a designer tightens a layout or a printer trims close.

The light margin indicator, the small arrow printed at the edge of many retail barcodes, exists purely to mark where the quiet zone ends so that artwork is not placed inside it. Codes that fail intermittently at a till, scanning at some angles and not others, are very often a quiet zone problem rather than a print quality one.

Printing so it actually scans

Print at 100% scale. This is the single most common cause of a barcode that will not read: a print dialogue set to fit the page shrinks everything by a few percent, and a symbol printed below the minimum bar width is out of specification even though it looks fine.

Use vector rather than a raster image. An SVG prints at the printer's own resolution with clean bar edges; a PNG at the wrong resolution puts bar boundaries between pixels, and the anti-aliasing that follows softens exactly the edges the scanner is looking for.

Contrast and colour matter more than they appear to. Scanners read reflectance rather than colour, and traditionally red light, which means red bars on white are close to invisible to a red-light scanner. Black on white is the safe choice; dark blue or dark green on white generally works; anything light, inverted, or on a busy background does not.

Then test before committing. Print one, scan it with a real scanner and with a phone app, and only then print the run. A batch of several thousand labels that do not read is a problem that a single test print prevents entirely.

Batch sheets, and what they are for

Anyone with more than a handful of products needs many barcodes rather than one, and generating them individually is the tedious part that most free tools leave to you.

Batch mode takes a list, one code per line, and lays out a printable grid. Codes that fail validation are listed separately rather than silently dropped, which matters: a sheet with a missing label because one digit was mistyped is worse than an error message, because it gets discovered at the point of labelling.

For labelling stock, print onto plain paper and check the alignment before using adhesive label stock, which is considerably more expensive. Set the column count to match the label sheet you are using, and remember that the printer's own margins will shift everything slightly if scaling is left on.

Frequently asked questions

Which barcode type do I need?

EAN-13 for retail products sold outside North America, UPC-A for retail in the US and Canada. Code 128 for shipping labels, internal SKUs and Amazon FNSKU labels. ITF-14 for outer cases. EAN-8 only where a full EAN-13 physically will not fit, and Code 39 only if an existing system requires it.

Can I make up my own barcode numbers?

For internal use, yes: Code 128 and Code 39 encode whatever you give them, and a warehouse scanner does not care where the number came from. For anything sold through retail you need a GTIN licensed from GS1, because the number identifies you as the brand owner and retailers verify it.

Do I have to buy barcodes from GS1?

To sell through most major retailers, yes. Resold barcodes from third parties are cheaper and are increasingly rejected, since retailers and marketplaces check the GS1 registry and find the prefix belongs to somebody else. Amazon has enforced this for several years.

What is the check digit and why is it added automatically?

The last digit of an EAN, UPC or ITF code is calculated from the ones before it, using a fixed weighting. It exists so a scanner can tell it misread something. Enter the digits without it and the correct one is added; enter it and it is verified rather than trusted.

How small can a barcode be printed?

GS1 sets the smallest bar width for retail symbols at 0.264 mm, which gives an EAN-13 about 29.8 mm wide. Below that, checkout scanners are not obliged to read it. For internal use with your own scanners you can go smaller, and it is worth testing before printing a run.

Why does my printed barcode not scan?

Almost always one of three things. The print dialogue scaled the page, so the bars are narrower than intended. The quiet zone, the clear space either side, was cropped or covered. Or the printer resolution smeared the bar edges. Print at 100% scale, leave the margins alone, and use the SVG rather than a low-resolution image.

Can I print a sheet of different barcodes at once?

That is what batch mode does. Paste one code per line and it lays them out in a grid you can print and cut. Invalid lines are listed separately rather than silently skipped, so a mistyped digit does not produce a sheet with a gap in it.

Is my product list sent anywhere?

No. The encoding runs entirely in this page and nothing is uploaded. You can confirm that by opening your browser's network tab, or by disconnecting from the internet after the page loads and seeing that it still works.

Related calculators