Barcode Generator

Free Barcode Generator

Generate EAN-13, UPC-A or Code 128 barcodes with a valid check digit, and download as PNG or SVG. Free, runs in your browser.

Encoded value
Check digit
EAN-13 and UPC-A end in a check digit that is calculated from the others. Type twelve digits and the thirteenth is worked out for you; type thirteen and it is verified, so a typo is caught rather than printed.

Last updated 28 August 2026

Check digits, and why they matter

EAN-13 and UPC-A are not arbitrary numbers. The final digit is a checksum derived from the ones before it, using a weighted sum that alternates between one and three across the sequence. That single digit is what lets a scanner reject a misread rather than silently return the wrong product, and it is also why you cannot invent a barcode number and expect it to work — the check digit has to agree. This tool calculates it when you supply twelve digits and verifies it when you supply thirteen, so a transposed pair is caught before anything reaches a printer. Code 128 is a different animal: it encodes arbitrary text rather than a fixed-length number, choosing between character sets as it goes, and carries its own modulo-103 checksum that is never displayed. It is what most internal systems use for asset tags and shipping labels precisely because it has no registry behind it.

Common questions

Can I make up my own EAN-13 number?

You can generate one, but it will not be valid for retail. Real EAN and UPC numbers are issued through GS1, and the prefix identifies the company. For internal use — stock, assets, your own labelling — Code 128 is the right choice because it has no registry behind it.

How is the check digit calculated?

Digits are multiplied alternately by one and three, summed, and the check digit is whatever brings that total up to the next multiple of ten. Enter twelve digits and it is added for you; enter thirteen and it is verified against your input.

What is the difference between EAN-13 and UPC-A?

UPC-A is twelve digits and used mainly in North America; EAN-13 is thirteen and used internationally. A UPC-A number is effectively an EAN-13 with a leading zero, and modern scanners read both.

Which format should I pick for internal labels?

Code 128. It takes letters as well as numbers, has no length restriction, needs no registration, and is compact — which is why it dominates shipping labels and asset tags.

The other tools