EAN-13 / GTIN Generator and Validator - GS1 Check Digit Calculation | Federico Calò
Generate the full 12-digit GS1 EAN-13 code or verify a 13-digit barcode. Conforms to GS1 General Specifications v24.0 §7.10.
The EAN-13 (European Article Number 13 digits) is the international GS1 standard for uniquely identifying retail products, in logistics and e-commerce. It has the same structure as ISBN-13, ISSN-13, and GTIN-13: 12 digits of payload followed by a check digit calculated using the official GS1 algorithm.
This calculator implements the algorithm described in GS1 General Specifications v24.0 §7.10: alternating weights of 1 and 3 are applied to the 12 digits from left to right, the sum is reduced modulo 10, and the check digit is the ten's complement. The result is deterministic, verifiable, and conforms to the international standard.
Use the Generate mode to obtain a complete EAN-13 code from a 12-digit GS1 payload (country prefix + company code + article code). Use the Validate mode to check if an existing barcode is correct or has been damaged/erroneously transcribed.
Configure
Result
No results
Enter values and press the button to calculate.
Practical example: calculation of a check digit
Payload GS1 of example: 590123412345 (12 digits). Applying the GS1 §7.10 algorithm (alternating weights 1 and 3):
Control digit = (10 − (83 mod 10)) mod 10 = (10 − 3) mod 10 = 7. Complete EAN-13 code: 5901234123457.
Frequently Asked Questions
What is an EAN-13 code and what does it serve?
EAN-13 (European Article Number, 13 digits) is the GS1 standard for unique product identification. It's printed on products as a barcode and scanned at points of sale, warehouses, and logistics. It consists of: country GS1 prefix (2-3 digits) + company code + article code + control digit.
How is the EAN-13 control digit calculated?
The GS1 algorithm multiplies the 12 digits of the payload, alternating between weights 1 and 3 from left to right: (N₁×1 + N₂×3 + N₃×1 + … + N₁₂×3). The check digit is (10 - (sum mod 10)) mod 10. This ensures that any single incorrect digit produces an invalid code.
What is the difference between EAN-13, GTIN-13 and UPC?
GTIN-13 (Global Trade Item Number) is the 13-digit GS1 identifier; the EAN-13 barcode format carries it. The UPC-A (12 digits, mainly used in North America) is a subset: can be converted to EAN-13 by adding an initial zero. The validator supports both GTIN-13 and EAN-13 as they have the same schema.
Can I use an online generated EAN-13 for selling my products?
This tool calculates the mathematical checksum, but a legally usable EAN-13 requires assignment of an enterprise prefix by GS1 Italy (gs1it.org). Only codes with registered GS1 prefixes guarantee global uniqueness. Using unassigned prefixes causes conflicts in product databases.
Are data being sent to external servers?
No. All calculations happen directly in your browser (JavaScript client-side). No data is sent to external servers. The tool is fully offline-capable once the page has loaded.
Does this tool also validate ISBN and ISSN codes?
Yes. ISBN-13 (prefix 978 or 979) and ISSN-13 (prefix 977) codes conform to the EAN-13/GTIN-13 standard of GS1. The validator automatically recognizes the prefix and applies the same verification algorithm for the check digit.
How is it used?
- Choose a mode
Select "Generate" to get the full EAN-13 code from 12-digit GS1, or select "Validate" to check if a 13-digit barcode is valid.
- Enter numbers
For the generation: enter the 12-digit GS1 payload code (company prefix + article number). For validation: enter the complete 13-digit EAN-13 barcode.
- Get the result
The calculator applies the GS1 algorithm (alternating weights 1/3) and shows either the calculated check digit or the validity verdict of the inserted code.
- Use the code
The generated EAN-13 code conforms to the GS1 standards and can be used for product labeling, logistics, and commerce (following registration of the GS1 prefix with GS1 Italy).
Do you need a custom analysis?
This tool is free and informative. For in-depth analysis with AI on-prem - private data, zero cloud - contact Federico.