Anatomy of an EAN-13 code
An EAN-13 barcode holds 13 digits, but you only supply the first 12; the thirteenth is a check digit derived by a weighted sum. Counting from the left, odd positions weigh 1 and even positions weigh 3, add them up, take the remainder modulo 10, then subtract from 10 (a remainder of 0 means the check digit is 0). The first three digits are the country prefix: 690 to 699 is mainland China, 45 and 49 Japan, 00 to 13 the US and Canada.
Steps
- Enter the first 12 digits. Digits only; no spaces or dashes.
- Click Generate barcode. The tool computes the check digit and draws the bars, and the full 13-digit value appears below.
- Save the image with a right click, or copy the code value. Before handing it to print, confirm the file is vector or a high enough resolution raster.
- To validate someone else's code, paste all 13 digits and the tool reports whether the check digit matches. If it does not, a digit was transcribed wrong.
Why a scanner refuses to read it
When a barcode will not scan, size is usually the culprit rather than encoding. EAN-13 has a minimum module width; the nominal symbol is roughly 37.29 mm wide and 25.93 mm tall. Print at a bar height of at least 2 cm and leave a quiet zone of about 11 modules on each side, or the scanner treats the border as a bar. Do not put the code on a dark background, and avoid colored inks — red on black or dark blue on black lacks contrast. Phone cameras cope well, but cheap laser scanners struggle with codes shown on a screen, so use printed labels in production.
Common snags
A length warning usually means full-width digits crept in: typing 4006 with a Chinese IME produces invalid characters. If the computed check digit disagrees with the packaging, first confirm you did not drop the twelfth digit, then check the prefix against the actual origin. For internal stock labels, note that EAN-13 is a retail product code; Code 128 is the usual choice for logistics, and the two are not interchangeable.