Skip to content
100% local

EAN and UPC validator

Check the check digit of EAN-13, EAN-8, UPC-A and UPC-E barcodes, or complete a missing one.

Input
Output

EAN and UPC validator

Paste one barcode number per line and this tool checks whether its check digit is correct, using the mod-10 algorithm GS1 defines for EAN-13, EAN-8, UPC-A and UPC-E codes. It's built for developers wiring up a scanner or POS integration, warehouse staff auditing a product feed, and anyone confirming a barcode printed on packaging is actually valid before it goes to print.

Code type controls how each line is read: auto-detect picks EAN-13, EAN-8 or UPC-A by length, or force a specific format when the input is ambiguous — useful for UPC-E, which shares its 8-digit length with EAN-8. Complete missing check digit fills in the last digit when a line is one digit short, so pasting the 12 data digits of an EAN-13, or the 6-digit core of a UPC-E, returns a complete, valid code. Convert UPC-A/UPC-E to EAN-13 rewrites valid North American codes into their 13-digit form with a leading zero, the form many European systems expect. Show country from GS1 prefix reads a valid code's leading digits against the public GS1 prefix ranges and prints the ISO country code that issued it — a sanity check, not proof of where the product was made.

Interior spaces and dashes are stripped before validation, so codes copied from a spreadsheet work as-is. Each line is checked independently — mixing formats in one paste is fine — and anything that doesn't match a known length or contains non-digit characters is reported as invalid rather than skipped silently. Keep only valid lines trims the output to a clean list of working codes.

Everything runs in your browser: barcode numbers never leave your device. Copy the result, download it as a .txt file, or send the output back into the input for another pass.

FAQ

How is the check digit calculated?
The tool applies the GS1 mod-10 algorithm: digits are weighted 3 and 1 alternately from the right, summed, and the check digit is whatever brings that sum to the next multiple of 10. EAN-13, EAN-8 and UPC-A all use this same rule; UPC-E is checked by expanding it back to its 12-digit UPC-A form first.
What is the difference between EAN-13, UPC-A and UPC-E?
EAN-13 (13 digits) is the standard used across Europe and most of the world; UPC-A (12 digits) is its US/Canada counterpart, mathematically an EAN-13 with a leading zero; UPC-E (8 digits) is a compressed version of UPC-A for small packaging that expands back to 12 digits following a fixed set of rules.
Why does auto-detect sometimes pick the wrong format?
EAN-8 and UPC-E are both 8 digits, so auto-detect treats an 8-digit code as EAN-8 by default. Select UPC-E explicitly from the code type list if that's what you're validating.
How accurate is the country lookup?
It reads the standard GS1 prefix ranges, which identify the GS1 member organization that issued the number — not necessarily the country where the product was manufactured. Some ranges (coupons, restricted or internal use) have no assigned country and are left blank.
Are my barcode numbers uploaded anywhere?
No. Validation runs entirely in your browser, using only built-in checksum math and a static prefix table — nothing you paste here is sent to a server.