Barcode Generator

EAN-13, UPC-A, EAN-8 and Code 128, as a sharp SVG or a PNG — with the check digit calculated rather than assumed.

Runs on your device — nothing you type is sent anywhere
Kind of barcode

Thirteen digits. Type the first twelve and the last one is worked out for you.

SVG for anything that will be printed — it stays sharp at any size. PNG for pasting into a document.

The number in an EAN or a UPC identifies a product and is issued by GS1. This page will draw any number you like, which is right for a mock-up and not enough for something you intend to sell.

Advertisement

How it works

Three steps, and the encoding happens in your browser.

STEP 01

Pick the kind you need

EAN-13 and UPC-A are the retail ones. Code 128 takes letters as well as digits and needs nothing registered, so it is the one for your own labels.

STEP 02

Type the number

For a retail barcode, leave off the last digit — it is calculated. Paste a full one and it tells you whether that last digit is right.

STEP 03

Download it

SVG for print, because it stays sharp at any size. PNG for dropping into a document.

When this comes up

Labelling your own stock

Asset tags, shelf locations, box numbers. Code 128 takes letters and digits and belongs to nobody, so you can start using it this afternoon.

Checking a number you were given

Paste the thirteen digits off a supplier’s sheet. If the last one is wrong, you find out here rather than after printing two thousand labels.

Mock-ups and packaging drafts

A design needs something barcode-shaped long before the real number exists. This draws one that scans, and says plainly that it is not yours.

Reprinting a damaged label

The barcode is scuffed but the number under it is still readable. Type it back in and print it again.

Advertisement

The digit at the end, and who owns the number

A barcode is not a picture of a number. It is the number, written in a code a scanner can read from a distance and at an angle, with enough redundancy that a scuff does not turn one product into another. Two of the things it does to earn that reliability catch people out.

The last digit is calculated, not chosen

Every EAN and UPC ends in a check digit, worked out from the digits before it: multiply them alternately by one and three, add them up, and take whatever gets you to the next multiple of ten. A scanner recomputes it on every read, and a code that fails the sum is rejected rather than guessed at.

Which means a barcode with the wrong last digit is not a slightly wrong barcode. It is one that will not scan — and it looks exactly like a working one. This page works the digit out for you, and if you paste a full number whose last digit does not match, it tells you which digit it should be instead of drawing something that fails at the till.

The number belongs to somebody

EAN-13 and UPC-A are the two formats retail runs on, and their numbers are not merely formatted — they are allocated. A company prefix comes from GS1, the organisation that administers them internationally, and the rest identifies your product within it.

So a number you invent will scan perfectly and still be wrong: it may already belong to somebody else’s product, and a retailer’s system will treat it as that product. For a packaging mock-up or a photograph that does not matter at all. For something going on a shelf, the number has to be issued to you.

This is the part most generators leave you to discover later, which is why it is written here rather than buried in a footnote.

Code 128 belongs to nobody

If you are labelling your own things — stock, equipment, shelves, folders — you do not want a retail format at all. Code 128 takes any printable character, digits and letters together, is read by essentially every scanner made, and requires no registration with anyone. Your own numbering scheme, printed this afternoon.

It also has a small piece of cleverness worth knowing: when the whole code is digits and there is an even number of them, it packs two digits into each symbol, so the barcode comes out about half as wide. That happens automatically here.

Leave the white space alone

The blank margin either side of a barcode is part of the barcode. It is called the quiet zone, it needs to be about ten bar-widths across, and it is how a scanner works out where the code starts rather than reading the edge of your box as a bar.

Every barcode this page produces includes it. The commonest way to break a correct barcode is to crop it tight or print it flush against a fold, so when you place it in a design, give it room.

Nothing you type is sent anywhere

The encoding tables are in the page and the drawing happens in your browser. There is no account, nothing stored, and no request carrying your product numbers to anybody.

Common questions

How do I make a barcode?

Choose the kind you need, type the number or text, and download it as an SVG or a PNG. For EAN-13, UPC-A and EAN-8 you can leave off the last digit — it is a check digit and this page calculates it. For your own labels, use Code 128, which takes letters as well as digits.

What is the check digit on a barcode?

The last digit of an EAN or UPC, worked out from the ones before it: the digits are multiplied alternately by one and three, added up, and the check digit is whatever brings the total to a multiple of ten. Scanners recompute it on every read, so a barcode with the wrong one simply does not scan.

Can I invent my own EAN-13 number?

It will draw and it will scan, but the number may already belong to a real product, and a shop’s system would read it as that product. EAN and UPC numbers are issued by GS1. Making one up is fine for a mock-up or a test; anything going on sale needs a number allocated to you.

Which barcode should I use for my own labels?

Code 128. It carries letters, digits and punctuation, every modern scanner reads it, and unlike the retail formats it requires no registration with anyone. Use your own numbering however you like.

Why does my barcode not scan?

Three common reasons: the check digit is wrong, the barcode was cropped tight so the white margin either side is gone, or it was printed too small for the scanner. That margin is called the quiet zone and it is part of the barcode — every one made here includes it.

Do I need an account?

No, and there is nothing to store. The encoding tables are in the page and the barcode is drawn in your browser, with nothing transmitted at any point.

Advertisement