EAN-13 Barcode Generator API
International product identification standard
Sample EAN-13 barcode
Generated live by the BarGen API from 590123412345
EAN-13 is the GS1 standard barcode for retail point-of-sale scanning outside North America, standardized under ISO/IEC 15420. It encodes a 13-digit number consisting of a GS1 country or company prefix, a product reference, and a check digit calculated with a weighted modulo-10 algorithm. Every retail item sold through mainstream European, Asian, and international supply chains carries an EAN-13 code, making it the most widely deployed consumer barcode format in the world.
Send BarGen 12 digits with format set to ean13 and the API computes the thirteenth check digit automatically, so you never need to implement the modulo-10 algorithm yourself. Output is delivered as SVG for packaging artwork and print production or PNG for e-commerce listings and internal previews, at any target resolution.
EAN-13 (European Article Number) is the international standard for product identification barcodes used in retail worldwide. Developed in 1976 as an extension of the American UPC-A format, it is now administered by GS1.
The barcode consists of 13 digits: a country code (2-3 digits), manufacturer code (4-5 digits), product code (4-5 digits), and a check digit. This structure allows for over one trillion unique product identifiers.
EAN-13 is the most widely used barcode format in global retail. Every product sold in supermarkets and retail stores outside North America uses this format. It is compatible with UPC-A, as UPC codes can be expressed as EAN-13 with a leading zero.
Applications include retail point-of-sale, inventory management, supply chain tracking, and price lookup systems. Publishers use a variant called ISBN-13 for book identification.
Common use cases
Retail point-of-sale scanning
EAN-13 is the default barcode on packaged consumer goods sold through supermarkets and retail chains worldwide, since virtually every POS scanner and inventory system reads it natively.
E-commerce product listings
Online marketplaces such as Amazon and eBay require EAN or UPC codes to list products, and sellers generate EAN-13 barcodes to match their GS1-registered GTINs.
Packaging and label design
Brand owners embed EAN-13 codes in packaging artwork during design so the barcode is print-ready before the product reaches production.
Generate EAN-13 via the REST API
curl "https://api.bargen.pro/v1/barcode/ean13?data=590123412345&format=svg" \
-H "X-API-Key: YOUR_API_KEY"
Returns the barcode as SVG. See the API documentation for all options.
Frequently asked questions
Do I supply all 13 digits or just 12?
Supply 12 digits; BarGen calculates and appends the 13th check digit using the standard GS1 weighted modulo-10 formula, so the resulting barcode is always valid without manual calculation.
What is the difference between EAN-13 and UPC-A?
EAN-13 encodes 13 digits and UPC-A encodes 12, but UPC-A is functionally a subset of EAN-13 with an implied leading zero, and most modern scanners read both formats interchangeably.
Can I use any 12-digit number for testing?
For testing, yes, any 12 digits will produce a scannable barcode, but for real retail distribution the leading digits must come from a GS1-issued company prefix to avoid conflicting with another company product code.
Start generating EAN-13 barcodes
Free tier with 1,000 API calls per month. No credit card required.