Barcode Generator

Make EAN, UPC, Code 128, Code 39 and ITF-14 barcodes — check digits handled, SVG, PNG or PDF out.

100% private — runs entirely in your browser. Your data is processed on your device and never sent to the internet.

About the barcode generator

A barcode is not a picture of some numbers — it is a specific pattern of bars and spaces with a check digit and a quiet zone, and get either wrong and the scanner simply beeps at you. This tool encodes each symbology properly from the specification, works out the check digit for you, and hands back a sharp file you can print.

Six types are covered: EAN-13, UPC-A and EAN-8 for retail products, Code 128 for anything with letters and numbers, Code 39 for older warehouse and asset systems, and ITF-14 for shipping cartons.

Everything happens in your browser. No value you type is sent anywhere, which matters when the value is a product code you have not launched yet.

How to use it

  • Pick the type. The hint under the options tells you how many digits it wants
  • Type the value. The barcode updates as you type
  • Adjust bar width and height if it is going on something small or something large
  • Add a caption if you want a product name or location printed under the code
  • Download as SVG, PNG or a print-ready PDF, or copy the SVG code straight into a page

Check digits are done for you

EAN, UPC and ITF all end in a check digit that is calculated from the digits before it. This tool handles it both ways:

  • Type the 12 digits of an EAN-13 and the 13th is worked out and added, and it tells you what it added
  • Type all 13 and the check digit is verified. If it is wrong you get the correct one rather than a broken barcode

That second case matters more than it sounds. A mistyped check digit produces a barcode that looks perfect and scans as nothing.

There is nothing to switch on here, because for EAN, UPC and ITF the check digit is part of the symbology, not an extra. A 12-digit EAN-13 is not a shorter barcode — it is not a barcode at all, and no scanner will read it.

Code 39 is the exception. Its check character is genuinely optional: most systems ignore it, but LOGMARS, HIBC and some defence and healthcare standards require it. So when you pick Code 39 a tick box appears to add the mod-43 check character, and it stays off unless you ask for it.

The quiet zone

The blank margin on either side of a barcode is part of the symbol, not decoration. A scanner uses it to find where the code begins, and the single most common reason a printed barcode "does not work" is that someone cropped it tight or put it flush against a box edge.

The quiet zone is included by default and shown in the output. Leave it on unless you are placing the barcode into a layout that already reserves the margin.

The text underneath

Two separate things can appear below the bars.

  • The number itself — on by default, and you should usually leave it on. GS1 requires the human-readable digits under a retail EAN or UPC, and it is what lets a cashier key the code in by hand when a label is damaged. It is printed grouped the conventional way, so an EAN-13 reads 5 901234 123457
  • A caption of your own — off unless you type one. This is for a product name, a shelf location, an asset owner: whatever a person needs to read that is not encoded in the bars

The caption is drawn below the number in a proportional font, and it scales with everything else, so it survives into the PNG and the PDF exactly as shown on screen.

Printing to PDF

The PDF download puts the barcode at the top-left of an A4 page, inside a 10 mm margin, and sizes it in real millimetres rather than screen pixels.

That distinction matters. A barcode is a physical object: whether it scans depends on how wide the narrowest bar ends up on paper, not on how many pixels it had on screen. Setting the width in millimetres means what you specify is what gets printed.

  • Nominal size for a retail EAN-13 is about 37 mm wide. Scanners tolerate roughly 80% to 200% of that, so anywhere from about 30 mm to 75 mm is safe
  • For Code 128 asset tags, 40–60 mm is a comfortable range
  • For ITF-14 on cartons, go large — the whole point of that symbology is surviving rough printing

In batch mode you get one barcode per page, each at the same top-left position, which is the right starting point if you are feeding the pages into a label cutter or importing them into a layout.

Print at 100% with no scaling. "Fit to page" is the most common way a correctly generated barcode becomes an unscannable one.

Which type to use

  • EAN-13 — the standard retail barcode almost everywhere outside North America. 13 digits, issued to you by GS1
  • UPC-A — the North American retail equivalent, 12 digits. It is really an EAN-13 with a leading zero, which is why the two scan interchangeably
  • EAN-8 — a short version for packs too small for a full EAN-13
  • Code 128 — the workhorse for anything that is not a retail product: order numbers, asset tags, serials, addresses. Takes letters, digits and punctuation, and packs long runs of digits automatically so the barcode stays short
  • Code 39 — older, longer and less dense, but still required by some warehouse, defence and automotive systems. Its check character is optional and can be switched on
  • ITF-14 — printed on the outer carton rather than the product. Wide bars survive printing straight onto corrugated cardboard

If you are not sure and it is not a retail product, use Code 128.

Making a lot of them

Tick Make many at once and paste a list — one value per line, up to 200. Every line is encoded and checked separately, so a bad value is flagged with the reason instead of silently ruining the batch. The download then gives you a ZIP with one file per barcode, named after its value.

That is the usual way to produce labels for a product range or a set of asset tags in one go.

Good to know

  • Works on Windows, macOS, Linux and ChromeOS — it runs in the browser, so there is nothing to install
  • SVG is the better download for printing. It is resolution-independent, so the bars stay crisp at any size. PNG is fine for a screen or an email
  • Bar width is in whole pixels on purpose. Fractional bar widths blur when rasterised and are a common cause of scanning trouble
  • This tool creates barcodes; it does not register them. A retail EAN or UPC that will be sold in shops has to be issued to you by GS1 — inventing one risks clashing with a real product
  • Printing matters as much as the file: print at 100% with no scaling, keep good contrast, and do not stretch the barcode horizontally
  • The PDF is A4 with the barcode top-left. Bar width on screen does not affect it — the PDF uses the millimetre width you set
  • Code 128 accepts printable ASCII. Accented letters and emoji cannot be encoded and are reported rather than mangled

Related tools

We add new tools regularly — subscribe on YouTube to be notified when each one goes live.

More tools

View all

Recommended Apps

View all