Skip to content
Toolzent

EAN-13 Barcode Generator

Generate a scannable EAN-13 barcode free online. Enter 12 digits and the check digit is added automatically, with the full code drawn as a downloadable SVG barcode.

Updated 2026-06-14 · Free · No sign-up · Runs privately in your browser

Enter the first 12 digits and the check digit is added automatically, or paste a full 13-digit EAN to verify it.

Full 13-digit EAN-13
Check digit
Show the formula & steps

How the EAN-13 Barcode Generator Works

This tool draws a scannable EAN-13 barcode — the 13-digit standard found on retail products. Enter the first 12 digits and the generator computes the check digit and renders the full barcode as a crisp SVG. Paste a complete 13-digit code and it verifies the check digit for you.

The Check Digit Formula

Sum = (odd-position digits) + 3 × (even-position digits) Check digit = (10 − (Sum mod 10)) mod 10

Positions are counted from the left starting at 1. The check digit guarantees a single mistyped digit will be caught by the scanner.

How EAN-13 Is Encoded

The first digit is not drawn as bars. Instead it selects a parity pattern for the six left-group digits, mixing L-codes and G-codes. The six right-group digits use the R-code. Guard bars frame the code:

101 (left guard) → 6 left digits (L/G)01010 (center) → 6 right digits (R)101 (right guard)

Worked Example

For the first 12 digits 400638133393:

  • Odd-position digits sum to 20; even-position digits sum to 23.
  • Sum = 20 + 3 × 23 = 89.
  • 89 mod 10 = 9, so check digit = (10 − 9) = 1.
  • Full code = 4006381333931, drawn as the barcode above.

EAN-13 vs. UPC-A

EAN-13UPC-A
Digits1312
RegionInternationalNorth America
RelationshipSupersetEAN-13 with leading 0

To use a barcode in real retail, register a genuine number with GS1. This tool produces the image; it does not assign the number to your company. Right-click the barcode to save the image.

Frequently asked questions

What is an EAN-13 barcode?+

EAN-13 (European Article Number) is the 13-digit barcode used on retail products worldwide. It encodes a country or company prefix, a product reference and a check digit. The first digit is not drawn as bars; instead it sets the parity pattern of the left half, which lets a scanner read the code in either direction.

How is the EAN-13 check digit calculated?+

Take the first 12 digits, multiply the odd-position digits by 1 and the even-position digits by 3, add them up, take the remainder when divided by 10, and subtract it from 10 (a result of 10 becomes 0). For 400638133393 the sum is 89, so the check digit is (10 - 9) = 1, giving 4006381333931.

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

UPC-A is a 12-digit code used mainly in North America, while EAN-13 is its 13-digit international superset. A UPC-A code is simply an EAN-13 with a leading zero. EAN-13 encodes the first digit through left-group parity rather than as bars, so it fits 13 digits in nearly the same space.

Can I print this barcode on my product?+

Yes, the barcode is a faithful EAN-13 image you can download and print. However, to sell in retail you need a genuine, registered EAN number assigned to your company by GS1 or a licensed reseller. Generating a barcode image does not register the number to you.

Why must I enter exactly 12 or 13 digits?+

EAN-13 is a fixed-length symbology. Enter the first 12 digits and the tool computes and appends the 13th check digit. If you paste all 13 digits, the tool verifies your check digit and warns you if it does not match the calculated value.