validate_gtin
Verify a product barcode check digit and identify its type and country of origin. Handles EAN-8, UPC-A, EAN-13, and GTIN-14.
Instructions
USE THIS to verify a product barcode — GTIN/EAN/UPC — before trusting it, instead of guessing the check digit. Handles EAN-8, UPC-A (12), EAN-13 and GTIN-14, verifies the GS1 mod-10 check digit, and returns the barcode type plus the GS1 prefix's issuing country (e.g. 50 = UK, 690-699 = China, 978 = Bookland/ISBN). Validates structure only — it does NOT confirm the barcode maps to a real, registered product.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| gtin | Yes | The barcode digits (EAN-8/UPC-A/EAN-13/GTIN-14); spaces and hyphens are ignored. |