Skip to content
helpyself

Barcode Generator

Local only — nothing is uploaded unless you save or share it.

A barcode generator for EAN-13, UPC-A, EAN-8 and Code 128 — check digit included.

  1. Pick the symbology — EAN-13 for retail products, Code 128 for anything internal
  2. Type the number; the check digit is added or checked as you go
  3. Download the SVG for print, or the PNG for everything else
 
 
 

Which format?

Share a link

Saves this to your files and gives you a web address anyone can open. It stops working on its own.

Link lasts
Save this tool

Keep Barcode Generator handy

Bookmark it

About this tool

A retail barcode is not just the number printed underneath it: the bars encode a check digit calculated from every other digit, and getting it wrong produces a barcode that looks perfect and fails at the till. This generator does that arithmetic for you. Type the twelve digits of an EAN-13 and it appends the thirteenth; type all thirteen and it tells you whether the one you have is right, rather than quietly drawing something no scanner will accept. UPC-A and EAN-8 work the same way, with their own lengths and their own check sums. Code 128 is the one for anything that is not a retail product — internal SKUs, asset tags, order numbers — and takes letters as well as digits. The output is SVG, so it stays sharp at any size on a label or a shelf edge, and PNG is there for tools that will not take vectors. Both are drawn with the quiet zones the specification requires, which is the other half of why a home-made barcode often will not scan.

Frequently asked questions

What is the check digit, and do I need to type it?

It is the last digit of the number, and it is calculated from all the ones before it, so a scanner can tell a misread from a real code. You do not need to type it: enter the first 12 digits of an EAN-13 (11 for UPC-A, 7 for EAN-8) and it is added for you. If you do type the full number, it is checked instead — a wrong one is refused rather than drawn.

How do I make a barcode for a retail product?

Type the number and pick the symbology. As an EAN 13 generator it computes the check digit for you and refuses a number that cannot be valid, which is the failure that costs money — a barcode that scans as the wrong product is worse than one that does not scan. The UPC barcode generator side works the same way for twelve-digit North American codes.

Which symbology should I choose?

EAN-13 is the retail barcode used almost everywhere outside North America, UPC-A is its 12-digit North American sibling, and EAN-8 is the short version for packaging too small for either. Code 128 is the general-purpose one: it accepts letters, digits and punctuation, so it suits internal SKUs, asset tags and order numbers. If the barcode will be scanned at a shop till, it has to be one of the first three.

Can I invent my own EAN-13 number?

You can generate a valid barcode for any number, and this tool will draw it. That does not make it yours: real retail numbers are issued through GS1, and a made-up one may already belong to another company's product. For anything sold in a shop, buy the prefix. For a warehouse, a library or your own stock system, an invented number is fine — and Code 128 is usually the better choice there anyway.

Why will my printed barcode not scan?

Usually size or margins. A barcode printed too small, or scaled non-uniformly, blurs the narrow bars; and the white space either side — the quiet zone — is part of the code, so cropping tight to the bars breaks it. This generator includes the quiet zones and the SVG scales without distortion, so print the SVG rather than a stretched screenshot, keep it at least 25 mm wide for EAN-13, and leave the white margin alone.

SVG or PNG?

SVG for anything that will be printed: it is a vector, so the bars stay crisp at any size and a label printer gets exact edges. PNG is a fallback for software that will not accept vectors — a marketplace listing form, an older label designer, a spreadsheet. The PNG here is rendered from the same SVG at a fixed scale, so both encode identically.

What can Code 128 hold?

Any printable ASCII — letters, digits, spaces and punctuation. When the data is all digits and of even length it is encoded in Code C, which packs two digits per symbol and makes the barcode about half as wide; anything else uses Code B. Both are standard Code 128 and any scanner reads them without configuration.

Help improve this tool

Found a bug, want a change, or need a tool we don't have?

/barcode-generator

↑↓ to move · Enter to open · Esc to close