Back to feed
Dev.to
Dev.to
7/5/2026
The original title is: "How to Validate a GTIN / EAN-13 Barcode Check Digit (GS1 Mod-10, explained)"

The original title is: "How to Validate a GTIN / EAN-13 Barcode Check Digit (GS1 Mod-10, explained)"

Original: How to Validate a GTIN / EAN-13 Barcode Check Digit (GS1 Mod-10, explained)

Short summary

Explains the GS1 Mod-10 algorithm for calculating GTIN/EAN-13 barcode check digits with a worked example and Python code. Essential for validating product feeds on Amazon, Shopify, and Google Merchant Center—missing or incorrect check digits cause catalog rejections. Includes practical tips for Excel and common format errors.

  • GS1 Mod-10 algorithm: multiply alternating digits by 3/1, sum, find remainder to next multiple of 10
  • Works for GTIN-8, UPC-A, EAN-13, and GTIN-14; check digit catches typos and format errors
  • Python code snippet provided; free browser-based validator and JSON API linked for bulk validation

Generated with AI, which can make mistakes.

Is this a good recommendation for you?

Comments

Failed to load comments. Please try again.

Explore more