How to Validate a UPC Code
A quick way to validate UPC-A format and understand what a UPC check digit can and cannot prove.
Start With the Length
A UPC-A code has exactly 12 digits. If you have 11 digits, you can calculate the check digit. If you have 13 digits, you are usually looking at EAN-13 instead of UPC-A.
Check the Final Digit
The last digit is a checksum calculated from the first 11 digits. A validator can detect many typing errors by comparing the entered final digit with the expected check digit.
Know the Limit
A valid checksum does not mean the UPC is officially assigned. It only means the number follows the UPC-A math rule.