GTIN barcode validator: EAN-13, UPC-A (GTIN-12), GTIN-8/14, GLN and SSCC check digits
gtin_barcode_validateGTIN barcode validator: validate and convert GS1 identifiers: GTIN-8, GTIN-12 (UPC-A), GTIN-13 (EAN-13), GTIN-14, GLN and SSCC. Returns the check-digit verdict, the computed correct check digit, the GTIN-14 form with its indicator digit, and conversion between GTIN-8, -12, -13 and -14. No company-prefix split is returned: GS1's prefix-length table is no longer public data. Also computes a missing check digit from a partial code. Structure only, no product database. Price: $0.05 per successful call, paid over x402 (USDC on Base).
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | No | validate (default), checkdigit (compute the missing final digit) or convert. Accepted: validate, checkdigit, convert. | |
| to | No | Target format. Required when op=convert. Accepted: gtin8, gtin12, gtin13, gtin14. | |
| value | Yes | GS1 code, digits with optional spaces or hyphens. For op=checkdigit, omit the final digit. Accepted: 8, 12, 13, 14 or 18 digits. |