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.


Barcode type
Enter 12 digits and the check digit is added, or 13 digits to verify one you already have.
Clear

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.

Frequently asked questions

Choose UPC-A, enter your eleven digit number and the check digit is calculated and added automatically. If you already have all twelve digits, enter them and the tool verifies the check digit instead. Download the SVG for printing or the PNG for screen use.

It is the final digit of an EAN or UPC number, worked out from all the others so that scanners can detect misreads. You do not need to calculate it yourself: enter the digits without it and this tool adds the correct one. If you enter it and it is wrong, the tool tells you what it should be.

Technically it will scan, but you should not use an arbitrary number commercially. Retail barcode numbers are allocated by GS1 and are tied to your company, and using a number you do not own risks colliding with another product in retailer databases. Generate freely for internal labelling, testing and asset tags.

UPC-A has twelve digits and is the North American standard; EAN-13 has thirteen and is used internationally. A UPC-A is really an EAN-13 with a leading zero, so modern scanners handle both. If you are selling outside North America, EAN-13 is the safer choice.

For retail products, EAN-13, or UPC-A for North America. For shipping labels and anything carrying letters and digits, Code 128, because it is compact and encodes the full character set. Code 39 only if a system you are working with specifically requires it, since it is much less efficient.

Usually the quiet zone or the contrast. Leave blank margin either side of at least ten times the narrowest bar width, print black on white, and never stretch the image horizontally. Printing too small is the other common cause, as is printing on a shiny surface that reflects the scanner beam.

SVG for anything that gets printed, because it is vector and stays sharp at any size. PNG is fine for screen use, previews and quick documents, but scaling it up will soften the bar edges, which is exactly what makes a barcode fail to scan.

No. The number or text you enter is used to build the image in memory and is never written to a log or a database. The generated files are placed in a temporary folder that is cleared automatically, and nothing links them back to you.

How do you generate a barcode?

Pick the type, enter the number and the barcode is drawn on our server. For EAN-13, EAN-8 and UPC-A the check digit is calculated automatically, or verified if you supply it. Code 128 and Code 39 take letters as well as digits. Download as PNG for screen or SVG for print.