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.

Guides: Node.js · Python

Try it

Query Parameters

ParameterTypeRequiredDescription
valuestringYesEAN-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

FieldTypeDescription
validbooleanWhether the barcode passed checksum validation
formatstringDetected barcode format: EAN-8, GTIN-12, EAN-13, GTIN-14, or UPC-E. Present only when valid is true
prefixstringGS1 company prefix (2–3 digits). Present only for valid EAN-13 codes
prefixCountrystringCountry 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
}