Barcode Generator

Generate a scannable Code 128 or EAN-13 barcode from text or numbers, with the check digit worked out for you, and download it as a PNG.

Updated September 2026 Formulas tested

Quick answer: This tool generates Code 128 and EAN-13 barcodes by following the published bar-width and check-digit tables from their specifications. Code 128 encodes letters, numbers and common punctuation; EAN-13, used on retail products worldwide, takes 12 digits and calculates the 13th check digit for you. Both are drawn on your device and downloaded as a PNG.

Choose a barcode type, type your text or numbers, and a scannable barcode appears with the correct check digit added automatically. Code 128 accepts letters, numbers, spaces and common punctuation. EAN-13, used on retail products worldwide, takes 12 digits and calculates the 13th (the check digit) for you.

The barcode is drawn on your device; nothing you type is sent anywhere.

Which type should I use?

  • Code 128 is the more flexible option: it encodes letters, numbers and most punctuation, and is common for internal tracking codes, shipping labels and inventory systems.
  • EAN-13 is the standard for retail products worldwide (the barcode on a product you buy in a shop). It takes exactly 12 digits, usually assigned by GS1 or a retailer, and this tool adds the 13th check digit for you.

Both check digits are calculated using the published algorithms and verified against independently documented worked examples before this tool was released; see how we test.

A worked example

Example. Typing the 12 digits 590123412345 as an EAN-13 produces the check digit 7, matching the standard reference example for this barcode format, and a barcode that scans as 5901234123457.

Real-world examples

A small workshop labeling handmade inventory with internal SKU codes such as "WD-1024-B" uses Code 128, since it can encode the letters and the dash along with the digits.

Someone preparing a product to sell through a retailer that requires a standard barcode uses EAN-13 with the 12-digit number assigned by GS1 or their retailer, letting this tool add the 13th check digit.

Common mistakes to avoid

  • Printing a barcode too small. Scanners need the bars to be a minimum width apart; enlarge the download if a scan fails.
  • Removing the white space (quiet zone) around the barcode. Scanners use it to find the edges, so keep some white margin when placing it in a document.
  • Typing 13 digits for EAN-13. This tool asks for the first 12 digits only and calculates the 13th, the check digit, for you.

Frequently asked questions

Why does EAN-13 only ask for 12 digits?

The 13th digit is the check digit, calculated from the other 12, so you never need to work it out yourself.

Will this barcode actually scan?

The bar widths follow the published Code 128 and EAN-13 specifications exactly, and the checksum logic was verified against independently documented reference examples. Print it clearly, with white space around it, and test with a scanner or a phone barcode app before relying on it.

Can Code 128 encode numbers only, like EAN-13 does?

Yes, Code 128 accepts digits as well as letters, but it does not follow the retail EAN-13 standard, so use EAN-13 if you specifically need a product barcode.

What happens if I type a character Code 128 cannot encode?

A message tells you which character is not supported. Code 128 (subset B) here covers standard printable ASCII: letters, digits, spaces and common punctuation.

People also search for this as: barcode generator free, code 128 barcode generator, ean 13 generator, upc barcode maker, generate barcode online, barcode maker no sign up.

Sources and further reading

Formulas on this page are checked by automated tests against independent references. See how we test our tools.

Press Esc to close