Barcode Generator | Create EAN-13, UPC and Code 128 barcodes
Create a scannable barcode in seconds. Pick EAN-13, EAN-8, UPC-A, Code 39 or Code 128, enter your number or text, and the check digit is calculated and verified automatically. Download a PNG for screen or a vector SVG that stays sharp at any print size.
Which barcode type do you need
- EAN-13 is the retail barcode used almost everywhere outside North America, and increasingly inside it too. Thirteen digits: a country prefix, a manufacturer code, a product code and a check digit. If you are putting a product on a shop shelf, this is usually the one.
- EAN-8 is the short version of EAN-13, for packages too small to carry a full barcode. Eight digits total. Codes have to be allocated individually rather than derived from your EAN-13.
- UPC-A is the twelve-digit North American retail standard. It is really an EAN-13 with a leading zero, which is why modern scanners read both without noticing the difference.
- Code 39 encodes letters and digits and needs no check digit, which makes it popular for internal labelling, asset tags and military and automotive use. It produces wide barcodes for the amount of data it carries.
- Code 128 is the dense general-purpose format. It encodes the whole printable ASCII set and packs far more into the same width than Code 39, which is why it dominates shipping labels and logistics.
What the check digit does
The last digit of an EAN or UPC code is calculated from the others. Each digit is multiplied by 1 or 3 in an alternating pattern, the results are added, and the check digit is whatever makes the total a round multiple of ten. If a scanner misreads a digit, the sum no longer works out and the scan is rejected rather than silently registering the wrong product. This tool calculates the digit for you, or verifies the one you supplied.
Printing barcodes that actually scan
Most scanning failures come from printing, not from the code. Keep the quiet zone, the blank margin on both sides, at least ten times the width of the narrowest bar. Never stretch a barcode horizontally on its own, since it distorts the bar widths. Print black on white if you can, because scanners read contrast and red bars are effectively invisible to a red laser. Use the SVG for print so the bars stay crisp at any size.
Worth knowing
- Generating a valid barcode is not the same as owning the number. Retail codes must be bought from GS1, otherwise you may collide with another company product.
- The download is generated on our server and nothing you type is stored or logged.
- Use the SVG for anything printed. PNG is fine on screen but will look ragged when scaled up.
- Code 128 fits far more data in the same space than Code 39, so prefer it unless something specifically requires Code 39.
- Test the printed barcode with a real scanner before ordering thousands of labels.