Free 100% In-Browser Tool

Barcode Generator: Create EAN-13 & UPC-A Barcodes

Generate retail barcodes (EAN-13 and UPC-A) with automatic modulo-10 check digit calculation and instant preview.

Quick Answer:EAN-13 and UPC-A use a weighted modulo-10 check digit algorithm where alternating digits are multiplied by 3 and 1 to prevent scanning and transcription errors.
Initializing tool...

Privacy First: 100% Client-Side Processing

Processed in your browser. Files are never uploaded.

How to Use the Barcode Generator & Checksum Calculator (EAN-13 & UPC-A)

  1. 1Select your barcode symbology: EAN-13 (13 digits) or UPC-A (12 digits).
  2. 2Enter the initial digits of your product number (12 digits for EAN-13, 11 digits for UPC-A).
  3. 3View the calculated check digit and complete barcode string.
  4. 4Inspect the live rendered barcode preview or copy the full code.

Formula & How It Works

GS1 Modulo-10 Check Digit Algorithm

Check Digit = (10 - (Sum % 10)) % 10

For EAN-13: Multiply odd-position digits by 1 and even-position digits by 3. Sum all products, take modulo 10, and subtract from 10.

Worked Examples

Standard EAN-13 Product Barcode

Input: 400638133393 (First 12 digits)

Explanation: The weighted sum of digits mod 10 equals 9; 10 - 9 = 1.

Result: 4006381333931 (Check digit: 1)

Standard UPC-A Retail Barcode

Input: 01234567890 (First 11 digits)

Explanation: The odd-position digits weighted by 3 produce a check digit of 5.

Result: 012345678905 (Check digit: 5)

All Zeroes Sample

Input: 000000000000 (12 zeroes)

Explanation: Sum of zeroes is 0, yielding a check digit of 0.

Result: 0000000000000 (Check digit: 0)

Frequently Asked Questions

How is an EAN-13 check digit calculated?▼

Multiply every odd-index digit by 1 and every even-index digit by 3. Add all products together. The check digit is the amount you must add to this sum to reach the next multiple of 10.

Can I use an EAN-13 barcode in the US?▼

Yes, modern point-of-sale barcode scanners worldwide can read both 12-digit UPC-A and 13-digit EAN-13 barcodes.

Do I need to register a barcode before using it?▼

For commercial retail distribution in supermarkets or national retail chains, barcodes must be officially licensed through GS1.

What is the difference between 1D and 2D barcodes?▼

1D barcodes (like UPC and EAN) store data linearly in vertical black-and-white stripes. 2D barcodes (like QR codes and Data Matrix) store data in a grid of squares.

Is this tool free?▼

Yes, 100% free with client-side SVG generation.

Quick Reference & Conversion Table

SymbologyTotal DigitsCheck Digit PositionPrimary Geographic Usage
EAN-13 (GTIN-13)13 digits13th digitWorldwide (Europe, Asia, Global)
UPC-A (GTIN-12)12 digits12th digitUnited States & Canada
EAN-88 digits8th digitSmall product packages
Code 39VariableOptionalIndustrial, military & automotive

⚠️ Common Pitfalls to Avoid

  • •Typing all 13 digits when the 13th digit is meant to be mathematically calculated by the tool.
  • •Confusing EAN-13 (international 13 digits) with UPC-A (North American 12 digits).
  • •Using non-numeric letters in an EAN-13 or UPC-A barcode (only Code 39 or Code 128 support alphanumeric characters).

💡 Practical Real-World Uses

  • •Retail product packaging design and Amazon FBA product labeling.
  • •Inventory management systems, warehouse bin tracking, and point-of-sale scanning.
  • •Verifying printed barcode check digits before ordering mass product packaging runs.

UPC-A vs EAN-13

  • ✓UPC-A is the standard 12-digit barcode used across North American retail stores.
  • ✓EAN-13 is the international 13-digit standard; adding a leading '0' to any 12-digit UPC-A barcode converts it into an equivalent 13-digit EAN-13 code.
Last reviewed & updated: 2026-11-01
Free & Open Access
Related Utilities

Explore complementary calculators and converters with instant client-side execution

More in Generators

Explore Other Tool Categories

Browse our full collection of 50 free web utilities

View All 8 Categories