GTIN validation

GS1 GTIN-8/12/13/14 (EAN-8, UPC-A, EAN-13, GTIN-14) — checksum: GS1 mod-10 (weights 3,1). Free in your browser, or over the JSON API.

What it is

GS1 GTIN-8/12/13/14 (EAN-8, UPC-A, EAN-13, GTIN-14). CodeCheck verifies three things separately — format, length and check digit — and returns the expected and provided check digit, so a failed value tells you exactly what is wrong instead of just saying no.

Algorithm

GS1 mod-10 (weights 3,1). The answer is derived from the value itself, with no database lookup and no third-party call, so it is deterministic, fast and privacy-safe.

Examples

ValueResultExpectedProvided
4006381333931valid11
036000291452valid22

API

curl "https://<your-worker>.workers.dev/v1/validate/gtin/4006381333931"

This type has a single trailing check digit, so CodeCheck can also compute it:

GET /v1/complete/gtin/{body}

Try it in the browser demo — the demo runs the same code offline.

Other identifier types