EAN-13, UPC-A, Code 128 and Code 39, with the check digit computed.
What it's for
Make a barcode to print — for products you sell in shops, or for your own stock labels, shelves and asset tags.
Before you start
For goods sold in shops, have the product number issued to you by GS1; for your own labels, any code you choose will do. The barcode is drawn in your browser.
Choose the barcode type
Under Symbology, pick EAN-13 for products sold in shops, or UPC-A if a buyer asks for one. Choose Code 128 for your own labels with letters and numbers, or Code 39 when an old or simple scanner has to read it.
Type the number or text
Type it into Value, replacing the sample; the label says what this type accepts. For a shop code, type the digits without the last one — that check digit is worked out for you.
Add a check character, for Code 39 only
With Code 39, tick Add the modulo-43 check character only if your scanner or system expects one. Otherwise leave it off.
Press Generate and look it over
Press Generate to bring the barcode into view; it is redrawn as you type, with the number printed under the bars.
Download it
Press Download SVG to save an image that prints sharp at any size. Do not crop the white margin on either side — a scanner needs it.
Reading the result
If it goes wrong
The check digit is the part worth understanding. The last digit of an EAN-13 or UPC-A is not data — it is computed from the twelve before it, and it exists so that a scanner can tell when one of them has been misread.
Which is why this page refuses a wrong one rather than fixing it. If the check digit does not match, some other digit is mistyped; silently replacing the last one gives you a barcode that scans perfectly and identifies a different product. That is the worst outcome available, and it is what a helpful tool would quietly hand you.
The first digit of an EAN-13 is not drawn. Look at the bars and you will find twelve digit symbols, not thirteen. The missing one is carried by which of two left-hand alphabets each of the first six digits uses — the parity pattern. It is why the symbol is 95 modules wide instead of 102, and why an EAN-13 cannot be read symbol by symbol from the left.
The white margin is part of the barcode. The quiet zone is nine modules on an EAN-13 and ten on the others, and a scanner needs it to find where the symbol begins. Cropping an image tight to the bars is the single commonest reason a generated barcode will not read, so the download here includes it.
One thing this cannot give you: a number. Retail codes are issued by GS1 and the prefix identifies the company that owns it. A made-up EAN will scan and may already belong to somebody else's product. For internal labels, use Code 128 — that number space is yours.
The last digit of an EAN-13 or UPC-A is computed from the others, and its whole purpose is to catch a mistyped digit. If the one you enter does not match, something else in the number is wrong — so this refuses the code rather than correcting the last digit for you. A "corrected" barcode is perfectly scannable and points at a different product, which is worse than no barcode at all. Enter twelve digits and it computes the thirteenth.
Because there is no room for it. There are only twelve digit symbols in the pattern. The thirteenth is carried by which of two left-hand alphabets each of the first six digits uses — the parity pattern. That is why an EAN-13 is 95 modules wide rather than the 102 a straight count suggests, and why you cannot read one symbol at a time from left to right.
Nine times out of ten, the quiet zone. The blank margin either side of the bars is part of the symbol, not decoration, and cropping an image tight to the bars removes it. The margin is included in the download here. The other common causes are printing it too small, printing it on a curved or shiny surface, and insufficient contrast — black on white, always.
EAN-13 or UPC-A if the item will be sold at retail, and only with a number issued to you by GS1 — a made-up one may already belong to somebody else. Code 128 for anything internal: it takes any printable ASCII and packs digits two to a symbol, so it is compact. Code 39 when you need something an old or simple reader will definitely handle, accepting that it is about a third wider.
You can generate one here, and you should not put it on anything for sale. Retail barcode numbers are issued by GS1 and the prefix identifies the company that owns it. A made-up number will scan happily and may collide with a real product somewhere in the world. For internal stock, labels and asset tags, use Code 128 instead — nobody owns that number space.
Not with a scanner, and it is worth being straight about it. Each symbology is verified structurally and by decoding the generated pattern back to the original value, which is a genuine check and catches most classes of error. The QR generator on this site was additionally compared against a reference encoder and read with a real camera; these have not been. Test with a physical reader before printing them on anything that matters.
The alternating weights are what make it catch a transposition — two swapped digits change the total.
Code 128 has a numeric mode that carries two digits in the space of one character. It is used automatically here when a run of digits is long enough to pay for the switch.
Important
Generated in your browser; nothing is transmitted. These symbologies are verified structurally and by decoding them back, which is not the same as testing with a scanner — check with a real reader before printing at scale. Retail barcode numbers must be issued by GS1. Nothing you type here is sent to our servers — the calculation runs entirely in your browser.