EAN / GTIN / UPC
GET/v0/ean
Validates GS1 product barcodes in all standard lengths: EAN-8, GTIN-12 (UPC-A), EAN-13 (GTIN-13), GTIN-14 (ITF-14), and UPC-E (6 or 8 digits, automatically expanded to UPC-A). Verifies the check digit using the GS1 weighted-sum algorithm. For codes with 13+ digits the GS1 company prefix is decoded and the issuing country or region is returned. Spaces and hyphens in the input are stripped automatically.
Try it
Query Parameters
| Parameter | Type | Required | Description |
|---|---|---|---|
| value | string | Yes | EAN-8, EAN-13, GTIN-12, GTIN-14, UPC-A, or UPC-E barcode to validate |
Example Request
curl -H "Authorization: Bearer YOUR_API_KEY" \ "https://api.isvalid.dev/v0/ean?value=5901234123457"
Response Fields
| Field | Type | Description |
|---|---|---|
| valid | boolean | Whether the barcode passed checksum validation |
| format | string | Detected barcode format: EAN-8, GTIN-12, EAN-13, GTIN-14, or UPC-E. Present only when valid is true |
| prefix | string | GS1 company prefix (2–3 digits). Present only for valid EAN-13 codes |
| prefixCountry | string | Country or region that issued the GS1 prefix (e.g. "Poland", "Germany"). Present only for valid EAN-13 codes |
Example Response — EAN-13
{
"valid": true,
"format": "EAN-13",
"prefix": "590",
"prefixCountry": "Poland"
}Example Response — EAN-8
{
"valid": true,
"format": "EAN-8"
}Example Response — invalid
{
"valid": false
}