EAN and UPC Barcode Validator
Paste a barcode number to check whether it is a valid EAN-13, UPC-A or EAN-8. The tool detects the type by length and verifies the GS1 mod-10 check digit. It can also compute the missing check digit for a partial code. Everything runs locally in your browser.
How to validate a barcode
- Paste the full barcode number into the box. Spaces are fine and are ignored.
- Read the valid or invalid result, the detected type, and the expected check digit.
- Switch to Compute mode and enter a code without its check digit to generate the missing digit.
Examples
A valid EAN-13
4006381333931
valid: true, type: EAN-13, check digit: 1
A valid UPC-A
036000291452
valid: true, type: UPC-A, check digit: 2
Compute the check digit for a partial UPC-A
03600029145
check digit: 2 (full code 036000291452)
Frequently asked questions
What is the EAN / UPC check digit?
The last digit of an EAN or UPC barcode is a check digit. It is calculated from the other digits using the GS1 mod-10 formula so that scanners can catch typos and misreads. This tool recomputes it and compares it with the digit you entered.
How is the check digit calculated?
Starting from the rightmost data digit and moving left, each digit is multiplied by an alternating weight of 3, 1, 3, 1 and so on. The products are summed, and the check digit is (10 minus (sum mod 10)) mod 10. The same rule works for EAN-13, UPC-A and EAN-8 because of their lengths.
What is the difference between EAN and UPC?
UPC-A is the 12-digit barcode used mainly in the United States and Canada. EAN-13 is the 13-digit international version and is a superset of UPC-A (a UPC-A code prefixed with a leading 0 is the same item). EAN-8 is a shorter 8-digit code for small packages. This tool detects which one you pasted by its length.
Which barcode formats does this support?
It validates EAN-13 (13 digits), UPC-A (12 digits) and EAN-8 (8 digits). Other symbologies such as Code 128, ITF-14 or QR codes are not numeric GTIN-style codes and are not checked here.
Why does my barcode show as invalid?
The most common reasons are a mistyped digit, a missing or extra digit, or pasting a code with the wrong number of digits. Compare the expected check digit shown by the tool with the last digit of your code to spot the error.
Is my barcode data sent anywhere?
No. All validation and check-digit math happens locally in your browser, so the numbers you enter never leave your device.
Related tools
UUID Validator
Validate a UUID and detect its version and variant. Paste a UUID or GUID, see if the format is valid, and read its version, variant and nil status.
JSON Formatter
Format, validate and minify JSON online. Pretty-print with custom indentation, sort keys and catch syntax errors. Runs in your browser.
CSV to JSON
Convert CSV to JSON online. Turn spreadsheet rows into clean JSON objects or arrays, with smart number and boolean typing. Free tier plus API.
BIC / SWIFT Validator
Validate a BIC or SWIFT code against ISO 9362. Check the format and country, then read the bank, country, location and branch parts of the code.
Credit Card Validator
Check a credit card number with the Luhn algorithm and detect the card type. Validation runs in your browser, so the number never leaves your device.
IBAN Validator
Validate an IBAN with the ISO 13616 mod-97 checksum. Paste an account number to verify the country, check digits and length, all in your browser.