Lengths differ by symbology
EAN-13 carries thirteen digits: the first marks the packaging variant, the middle ten belong to the vendor, and the last is a check digit. EAN-8 has eight and suits small packages. UPC-A has twelve and dominates North America, differing from EAN-13 mainly by the absent leading zero. All three share the same structure — start guard, data characters, centre guard, more data, stop guard — so one decoder can handle them, provided each is validated at its own length.
The check digit
Number the first twelve digits from the left, sum the odd positions, triple the sum of the even positions, add both, and take the complement to the next multiple of ten as the final digit. UPC-A and EAN-8 use the same rule at their own lengths. The digit exists to catch a single misread during scanning, so a trustworthy reader withholds output when the check fails instead of returning a wrong number — a detail that reveals whether the tool is sound.
Steps
- Click the image picker and upload a product barcode photo.
- Auto mode infers the symbology from image features; EAN-13, EAN-8 or UPC-A can also be forced.
- Tick mark the successful scan line, click Start and the result image draws the line that decoded; tick try rotation for tilted photos.
- A hit returns the number and symbology; Export JSON saves it and Clear resets.
Why photos fail
Low contrast comes first: pale bars on a pale background, or glare and shadow across part of the code. Blur next: hand shake softens bar edges until the decoder finds no clean transitions. Cropping third: bars need quiet zones on both sides, and cutting one end removes the guards. Angle fourth: beyond a certain tilt the bar widths distort. Screen re-photography last, where moiré destroys the bar ratios. The fixes are plain — shoot straight on, avoid glare, keep margins, use the original file.
What the number means and does not
Once decoded, the number identifies vendor and product code only: no price, origin or batch. One code may be reused across several marketplace listings, so scanned prices diverge from shelf prices routinely. Self-printed labels with a wrong check digit get rejected by commercial scanners, a common failure worth checking first.