GTIN / Barcode API
Pricing
from $1.00 / 1,000 api calls
GTIN / Barcode API
Validate, generate, and convert EAN, UPC, GTIN and ISBN barcodes via a simple HTTP API.
Pricing
from $1.00 / 1,000 api calls
Rating
0.0
(0)
Developer
Fatih Şahinbaş
Maintained by CommunityActor stats
0
Bookmarked
1
Total users
0
Monthly active users
2 days ago
Last modified
Categories
Share
GTIN / Barcode API — Validate, Generate & Convert EAN, UPC and ISBN
A fast HTTP API for barcode validation and check digit calculation. Verify EAN-13, EAN-8, UPC-A, UPC-E, GTIN-14, ISBN-13 and ISBN-10 codes, generate valid barcodes, and convert between formats — all through simple GET requests.
Catch bad product codes before they hit your catalog, your ERP, or your marketplace feed.
What it does
- ✅ Validate any barcode — automatic format detection plus check-digit verification, with clear error messages.
- 🔢 Calculate check digits — give it a code without the last digit and get the complete, valid barcode back.
- 🎲 Generate valid barcodes — for testing, seeding databases, or reserving internal codes. Pin a GS1 country/company prefix if you need one.
- 🔄 Convert between formats — UPC-A ↔ EAN-13, UPC-E ↔ UPC-A, ISBN-10 ↔ ISBN-13, and EAN-13/UPC-A → GTIN-14.
Supported formats
| Format | Length | Used for |
|---|---|---|
| EAN-13 | 13 | Global retail standard |
| EAN-8 | 8 | Small packaging |
| UPC-A | 12 | North American retail |
| UPC-E | 8 | Zero-suppressed UPC-A |
| GTIN-14 | 14 | Cases, cartons, ITF-14 |
| ISBN-13 | 13 | Books (978/979 prefix) |
| ISBN-10 | 10 | Legacy books (mod-11, X check digit) |
Who it's for
E-commerce teams validating supplier catalogs, ERP and PIM integrators cleaning product master data, marketplace sellers preparing feeds for Amazon/eBay/Trendyol, and developers building product-entry forms that shouldn't accept broken codes. Also useful for publishers and libraries handling ISBN migrations.
Endpoints
All endpoints are GET and return JSON.
| Endpoint | Purpose | Key params |
|---|---|---|
/validate | Validate and detect format | code, format (optional hint) |
/checkdigit | Compute the missing check digit | partial, format (optional) |
/generate | Create a valid barcode | format, prefix (optional) |
/convert | Convert between formats | code, to, src (optional hint) |
Spaces and hyphens in input are ignored, so 978-0-306-40615-7 works exactly like 9780306406157.
Examples
Validate
GET /validate?code=978-0-306-40615-7
{"valid": true,"format": "isbn13","normalized": "9780306406157","checkDigit": "7","errors": []}
Catch a bad code
GET /validate?code=4006381333930
{"valid": false,"format": "ean13","normalized": "4006381333930","checkDigit": "1","errors": ["check digit mismatch (expected 1)"]}
Check digit
GET /checkdigit?partial=400638133393
{ "format": "ean13", "partial": "400638133393", "checkDigit": "1", "full": "4006381333931" }
Generate with a GS1 prefix
GET /generate?format=ean13&prefix=869
{ "format": "ean13", "code": "8698780044561", "checkDigit": "1" }
Convert ISBN-10 to ISBN-13
GET /convert?code=0306406152&to=isbn13
{ "from": "isbn10", "to": "isbn13", "code": "9780306406157" }
How it works
The API runs in Standby mode — send HTTP requests directly, no run to start. Validation uses the GS1 modulo-10 algorithm for the whole GTIN family and modulo-11 for ISBN-10 (including the X check character). UPC-E conversion implements the standard GS1 zero-suppression rules in both directions, so expand-then-compress round-trips cleanly.
Tips
- Eight-digit codes are ambiguous between EAN-8 and UPC-E. Pass
format=upce(on/validate) orsrc=upce(on/convert) to disambiguate. - Only
978-prefixed ISBN-13 codes can be converted back to ISBN-10;979codes have no ISBN-10 equivalent. - Only UPC-A codes with number system
0or1can be compressed to UPC-E, and not all of them qualify. - Use
/generatewith a prefix to create realistic test data that still matches your GS1 range.
Pricing
Pay-per-event: $0.001 per successful API call. Readiness/health checks are never charged. No subscription, no minimums.