12-digit body calculated by the generator
- Input
- 400638133393
- Expected output
- 4006381333931
Weighted sum 89, modulo 10 equals 9, check digit 1.
EAN-13 check digit
EAN-13 is the 13-digit GS1 standard used in retail across nearly the whole planet. The first 12 digits identify the registered company and the specific product inside that company's own catalog, and the 13th exists only to catch a scanning or typing error: this generator accepts the 12-digit body and calculates the 13th digit automatically using the official GS1 formula.
Weighted sum 89, modulo 10 equals 9, check digit 1.
The same alternating 3-and-1 weight formula applies to any GS1 prefix, only the digits themselves change the result.
Since the body already has 13 digits, the generator only checks the format and never recomputes the check digit, even though the correct one would be 1.
Code 128 is a dense and flexible symbology for internal operations. EAN and UPC are numeric retail standards and depend on valid commercial identification.
Because typing all 13 digits makes the generator only validate the format and draw exactly what you wrote, without recalculating anything. Entering 12 lets the official formula compute the 13th check digit for you, avoiding a code with a wrong checksum.
Single-digit substitution errors, for example a bad scanner read or a typo made while registering the product. Because the sum's weights, 1 and 3, are both coprime with 10, swapping any one digit for another always changes the modulo 10 result, so the error never slips through mathematically.
No. They show the company prefix registered with the GS1 organization that issued it, not the country where the goods were physically manufactured. A factory anywhere in the world can produce goods carrying the prefix of the country where the brand's owning company is registered.
Because that alternation between two distinct weights, standardized by GS1, is exactly what every EAN, UPC and GTIN reader in the world expects when it recalculates and checks the digit. A uniform weight would catch fewer errors and, more importantly, would break compatibility with every scanner on the market.
<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 314 136" width="314" height="136" role="img" aria-label="Barcode TOOLS-2026"><rect width="100%" height="100%" fill="#fff"/><g fill="#111"><rect x="12" y="8" width="4" height="96"/><rect x="18" y="8" width="2" height="96"/><rect x="24" y="8" width="2" height="96"/><rect x="34" y="8" width="4" height="96"/><rect x="40" y="8" width="6" height="96"/><rect x="52" y="8" width="2" height="96"/><rect x="56" y="8" width="2" height="96"/><rect x="64" y="8" width="6" height="96"/><rect x="72" y="8" width="4" height="96"/><rect x="78" y="8" width="2" height="96"/><rect x="86" y="8" width="6" height="96"/><rect x="94" y="8" width="4" height="96"/><rect x="100" y="8" width="2" height="96"/><rect x="108" y="8" width="4" height="96"/><rect x="114" y="8" width="6" height="96"/><rect x="122" y="8" width="4" height="96"/><rect x="128" y="8" width="6" height="96"/><rect x="136" y="8" width="2" height="96"/><rect x="144" y="8" width="2" height="96"/><rect x="150" y="8" width="4" height="96"/><rect x="156" y="8" width="6" height="96"/><rect x="166" y="8" width="4" height="96"/><rect x="174" y="8" width="6" height="96"/><rect x="184" y="8" width="2" height="96"/><rect x="188" y="8" width="2" height="96"/><rect x="194" y="8" width="6" height="96"/><rect x="202" y="8" width="4" height="96"/><rect x="210" y="8" width="4" height="96"/><rect x="218" y="8" width="6" height="96"/><rect x="228" y="8" width="2" height="96"/><rect x="232" y="8" width="4" height="96"/><rect x="240" y="8" width="6" height="96"/><rect x="248" y="8" width="2" height="96"/><rect x="254" y="8" width="2" height="96"/><rect x="262" y="8" width="2" height="96"/><rect x="266" y="8" width="8" height="96"/><rect x="276" y="8" width="4" height="96"/><rect x="286" y="8" width="6" height="96"/><rect x="294" y="8" width="2" height="96"/><rect x="298" y="8" width="4" height="96"/></g><text x="157" y="123" text-anchor="middle" font-family="monospace" font-size="16" fill="#111">TOOLS-2026</text></svg>Everything is generated locally in the browser; the barcode value is not sent to the server.