Skip to content
ZeroServer.tools

Barcode Generator

Generate EAN-13, EAN-8, and UPC-A barcodes as SVG. Check digit calculated automatically.

Check digit: 7 →  Full barcode: 5901234123457

Enter digits to generate barcode

EAN and UPC barcode formats

EAN-13 (European Article Number) is the international retail standard for product identification, encoding 12 digits plus a check digit. EAN-8 is a compact variant for small products. UPC-A is the North American equivalent. All use alternating bar/space patterns where the width encodes binary data. The check digit is computed via a weighted sum to detect scanning errors.

Built and maintained by Meet Shah · Last updated

What this tool is used for

  • Producing a scannable barcode for a product mockup or a label proof.
  • Generating a barcode from a known product number for a test scan.
  • Checking that a number's check digit is right by seeing it encoded.
  • Producing an SVG barcode that stays crisp at print size.
  • Creating labels for internal inventory items.

Frequently Asked Questions

How is the check digit worked out?
For EAN-13, the twelve digits are weighted 1, 3, 1, 3… from the left, summed, and the check digit is whatever brings the total to a multiple of 10. EAN-8 uses the same rule with the weights reversed (3, 1, 3, 1…). Get it wrong and no scanner will read the code.
Where is the 13th digit actually drawn?
Nowhere — and this is the clever part of EAN-13. Only 12 digits are drawn as bars. The first digit is encoded in the *pattern* of odd and even encodings used for the left-hand six (LLLLLL, LLGLGG, LLGGLG and so on), which is what lets a 13-digit code fit in a 12-digit symbol.
What is the difference between UPC-A and EAN-13?
None, structurally: UPC-A is an EAN-13 with a leading zero. A US 12-digit UPC scans as `0` plus those digits anywhere in the world, which is why EAN-13 readers accept UPC-A without a separate mode.
Why are three different digit encodings used?
L, G and R. R-codes are the exact bit-inverse of L-codes, which makes the symbol readable upside down — the scanner detects it read an R pattern first and reverses. G is L reversed, and it is the odd/even choice that carries the hidden first digit.
Can I print the SVG at any size?
Scale it, but respect the quiet zone: at least 9 module widths of blank space on the left and 7 on the right of an EAN-13. Most failed scans are a barcode printed flush against other artwork, not a wrong number.

Common errors and gotchas

  • Printing too small or with too little quiet zone either side, which makes it unscannable.
  • Making up a product number, which may collide with a real registered product.
  • Scaling the barcode non-uniformly, which distorts the bar widths the scanner measures.
  • Rasterising at low resolution for print, where the bar edges blur together.
  • Confusing EAN-13 with UPC-A, which are related but not interchangeable in every system.

Related Generators tools

Private & free — this tool runs entirely in your browser.

CloudwaysManaged cloud hosting on AWS, GCP & DO — from $11/mo.affiliate