Free EAN-13 Barcode Generator: Check Digit, SVG, PNG
Generate an EAN-13 or UPC-A barcode, compute the check digit (e.g. 400638133393 → 1), validate a code and download it as SVG or PNG.
EAN-13, UPC-A and GTIN-14 check digit: GS1 method and examples
The check digit of an EAN-13 or UPC-A starts from the rightmost digit of the code body: weight 3, then 1, 3, 1… moving left. Add the products; the check digit is what brings the total up to the next multiple of ten. For 400638133393 the sum is 89 and the check digit is 1. For a case, the GTIN-14 (DUN-14) takes the EAN-13 without its check digit, puts an indicator digit in front and gets a new check digit: 7541234999997 gives 17541234999994 with indicator 1.
Formula
Check digit = (10 − (S mod 10)) mod 10, where S is the sum of the body digits weighted 3 and 1 alternately, starting with 3 on the rightmost digit. Starting from the right gives one rule for EAN-13 (12-digit body) and UPC-A (11 digits).
EAN-13 example: 400638133393
- Weight 3: 0, 6, 8, 3, 3, 3, so 23 × 3 = 69.
- Weight 1: 4, 0, 3, 1, 3, 9, so 20.
- S = 89, S mod 10 = 9, check digit = 10 − 9 = 1: full code 4006381333931.
UPC-A example: 03600029145
- Weight 3 (odd positions from the left): 0, 6, 0, 2, 1, 5, so 14 × 3 = 42.
- Weight 1: 3, 0, 0, 9, 4, so 16.
- S = 58, check digit = 2: full code 036000291452.
Barcode structure
95 modules: start guard (3), 6 left digits encoded L or G depending on the first digit (42), centre guard (5), 6 right digits in R (42), end guard (3). The first EAN-13 digit is not drawn as bars: it sets the parity pattern. A UPC-A becomes an EAN-13 by adding a leading 0, with the same check digit.
GTIN-14 check digit from an EAN-13 (DUN-14 case code)
A GTIN-14 identifies a grouping of identical units: a case, a carton, a single-product pallet. It takes three steps: drop the check digit of the unit's EAN-13, put an indicator digit from 1 to 8 in front, then compute a new check digit over the resulting 13 digits. For a UPC-A (12 digits), add a leading 0 first.
- EAN-13 7541234999997 without its check digit: 754123499999; with indicator 1: 1754123499999.
- Weight 3: 1, 5, 1, 3, 9, 9, 9, so 37 × 3 = 111. Weight 1: 7, 4, 2, 4, 9, 9, so 35.
- S = 146, S mod 10 = 6, check digit = 10 − 6 = 4: GTIN-14 17541234999994.
- UPC-A 990497300014: 0 + 99049730001, indicator 1, new check digit 1: GTIN-14 10990497300011.
Indicator digit: 1 to 8, and the case of 9
Indicators 1 to 8 give up to eight GTIN-14s for different groupings of the same item. GS1 does not fix their meaning, although 1 often stands for the first case size. Once all eight are used, a further grouping gets its own GTIN-13. 9 is reserved for variable measure items (weight or piece count that changes from one case to the next): that GTIN-14 is not derived from the unit's EAN-13, and the weight or quantity must be encoded as well. A 14-digit code starting with 0 is just the unit's EAN-13 padded with a zero.
ITF-14 barcode
The GTIN-14 is marked on the case as an ITF-14 (Interleaved 2 of 5): each pair of digits is encoded as five bars for the first digit and five spaces for the second, two of them wide each time. GS1 specification: target wide-to-narrow ratio 2.5:1 (range 2.25 to 3), 10X quiet zones left and right, X from 0.495 to 1.016 mm, bars at least 31.75 mm high. For plate printing, a 4.83 mm bearer bar surrounds the symbol and its quiet zones; on labels, two horizontal bars of at least 2X are enough. At 100% (X = 1.016 mm) the symbol is 142.75 mm wide with its quiet zones and 152.4 mm with the bearer bar.
Limits
- The tool computes and draws the code; it does not assign numbers. To sell in stores or on a marketplace, your company prefix must be assigned by GS1.
- Print at 100% with enough white margin on both sides.
Sources and dates: GS1 General Specifications, Release 26.0 published in January 2026: §2.1.7.2 and §2.1.10 (GTIN-14, indicators 1 to 8 and 9), §5.3.2 and §5.12.3.2 (ITF-14 symbol), §7.9 (check digit); the next release is planned for January 2027. GS1 Canada, What is a GTIN-14 and How to Use it, Release 1.0, January 2026 (examples 7541234999997 and 990497300014). GTIN overview by GS1 France and AECOC (GS1 Spain), check digit method by GS1 Germany (pages checked on 22/10/2026).
Frequently Asked Questions
How do I calculate the check digit of an EAN-13?
Multiply the first 12 digits by 1, 3, 1, 3… from left to right, add them up, then take the amount needed to reach the next multiple of ten. For 400638133393: sum 89, check digit 1.
What is the difference between EAN-13 and UPC-A?
EAN-13 has 13 digits (Europe, worldwide); UPC-A has 12 (US, Canada). A UPC-A is an EAN-13 with a leading 0, so both are read by the same scanners.
Can I use this barcode to sell my products?
For internal use (stock, labels), yes. To sell in stores or on Amazon, the prefix must be assigned to you by GS1: a made-up number may be rejected or clash with another product.
How do I calculate a GTIN-14 (DUN-14) from an EAN-13?
Drop the EAN-13's check digit, put an indicator digit from 1 to 8 in front, then compute a new modulo 10 check digit over the 13 digits. For 7541234999997 with indicator 1: 1754123499999, weighted sum 146, new check digit 4, so the GTIN-14 is 17541234999994.
Which indicator digit should I use for a case?
A digit from 1 to 8, chosen by the brand owner: GS1 gives them no fixed meaning, although 1 is often used for the first case. 9 is reserved for variable measure items, whose GTIN-14 is not derived from the unit's EAN-13.
How do I check a GTIN-14 check digit?
Weight the first 13 digits 3 and 1 alternately starting from the right, add them up and take the amount needed to reach the next multiple of ten: it must equal the 14th digit. 17541234999994 is correct; 17541234999995 is not, the expected check digit is 4.
What size is an ITF-14 barcode?
At 100% (X = 1.016 mm, ratio 2.5:1) the symbol is 142.75 mm wide with its 10X quiet zones, and 152.4 × 41.4 mm with the 4.83 mm bearer bar. GS1 allows an X from 0.495 to 1.016 mm and requires bars at least 31.75 mm high.
Is this tool really free?
Yes, all tools on Kristools are 100% free and accessible without registration.
Is my data protected?
Yes. All processing is performed directly and securely inside your browser. No personal data is sent to our servers.