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

EAN13 โ€” computed check digit
978014017739ยท8
Append the highlighted check digit to make the barcode valid.
  • Canonical form9780140177398
  • Check digit8
  • Render linkOpen in a browser to preview the visual barcode.https://barcodeapi.org/api/ean13/9780140177398
  • GTIN-equivalentEAN-13/UPC-A stored as 14-digit GTIN with a leading 0 for UPC-A.9780140177398
Note โ€” Preview URL hits an external rendering service (barcodeapi.org). For privacy-sensitive payloads use a local library (bwip-js, JsBarcode).

Step-by-step

  1. Body digits: 978014017739 (12 digits).
  2. Apply GS1 modulo-10: weights alternate 3,1,3,1โ€ฆ from the right of the body.
  3. check digit = (10 โˆ’ sum mod 10) mod 10 = 8.

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

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.

Related calculators

More tools you might like