Barcode Validator (EAN-13 / UPC-A / Code 128)

Validate a barcode number, compute the check digit, and produce a ready-to-render image URL. Supports EAN-13, EAN-8, UPC-A, Code 128, and ISBN.

Inputs

Digits only for EAN/UPC/ISBN (the check digit is computed). Code 128 accepts any printable ASCII.

Result

Loading calculator…

How to use this calculator

  • Pick the symbology your barcode is in.
  • Enter the data — with or without the check digit.
  • Read the canonical form and the computed/validated check digit.
  • Copy the render link to a browser to preview the barcode image.

About this calculator

Every retail product barcode in the world has a check digit at the end — a single digit chosen so the GS1 modulo-10 weighted sum lands on a multiple of 10. This tool computes that check digit for the symbologies you actually run into: EAN-13 (the global standard), EAN-8 (small packages), UPC-A (US/Canada retail), ISBN-13 (books), and Code 128 (any ASCII, used in shipping labels). Type the data digits and the tool gives you the canonical form, the check digit, and a ready-to-render preview URL. Type a complete barcode and the tool tells you whether the check digit is correct.

How it works — the formula

sum = Σ(digit_i · w_i), where w_i alternates {3,1} from right check_digit = (10 − sum mod 10) mod 10

GS1 modulo-10: a weighted sum where adjacent digits weight 3 vs 1, then the check completes the multiple of 10. Catches single-digit errors and most transposition errors.

Worked examples

Example 1
EAN-13 body 012345678901
Inputs:
data=012345678901, sym=ean13
Output:
check digit 2 → 0123456789012
Example 2
UPC-A 03600029145
Inputs:
data=03600029145, sym=upca
Output:
check digit 2 → 036000291452
Example 3
ISBN-13 9780140177398
Inputs:
data=9780140177398, sym=isbn
Output:
valid (Penguin Classics)

Limitations

  • No visual rendering inline — preview link points to barcodeapi.org.
  • Code 128 acceptance is permissive (any printable ASCII).
  • Does not check whether a real product is registered under the GTIN.

Check-digit calculation is exact; canonical industry algorithm.

Frequently asked

What is a barcode check digit?+
A single digit appended to the data digits so the weighted-sum modulo 10 is zero. For EAN/UPC/ISBN-13 the weights alternate 1 and 3 from the right. It is error-detection, not encryption.
What is the difference between EAN-13 and UPC-A?+
EAN-13 is the global standard (13 digits). UPC-A is the North-American retail standard (12 digits). UPC-A is equivalent to EAN-13 with a leading "0" — every modern scanner reads both as the same GTIN.
What is GTIN?+
Global Trade Item Number — the 14-digit canonical product identifier that subsumes EAN-13, UPC-A, and ITF-14. Stored systems often pad shorter codes with leading zeros to make every product 14 digits.
When should I use Code 128 vs EAN?+
EAN/UPC for retail products with a registered GTIN. Code 128 for logistics labels (shipping cartons, internal warehouse barcodes) where the data is arbitrary alphanumeric.
How accurate is the check-digit math?+
Exact arithmetic on GS1 modulo-10 — the canonical algorithm published in GS1 General Specifications §7.9. Every retail POS computes it the same way.

Related calculators

More tools you might like

Hand-picked tools that pair well with this one — same audience, same intent.