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.
Result
- 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
Step-by-step
- Body digits: 978014017739 (12 digits).
- Apply GS1 modulo-10: weights alternate 3,1,3,1โฆ from the right of the body.
- 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 10GS1 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
- Inputs:
- data=012345678901, sym=ean13
- Output:
- check digit 2 โ 0123456789012
- Inputs:
- data=03600029145, sym=upca
- Output:
- check digit 2 โ 036000291452
- 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.