1D Free plan

EAN-8 Barcode Generator API

Compact version for small products

Sample EAN-8 barcode

96385074 96385074

Generated live by the BarGen API from 9638507

EAN-8 is a compressed version of EAN-13 intended for products too small to fit a full 13-digit barcode, such as cigarettes, cosmetics, or single-serving snacks. It encodes 8 digits total: a shortened GS1 prefix, a product reference, and a check digit, and is standardized alongside EAN-13 under the GS1 General Specifications. Because the numbering capacity is much smaller than EAN-13, GS1 issues EAN-8 prefixes only on request and reserves them for genuinely space-constrained packaging.

BarGen accepts 7 digits with format set to ean8 and calculates the 8th check digit automatically using the same weighted modulo-10 method as EAN-13. Results are returned as SVG for compact packaging artwork or PNG for previews, with quiet zone and bar height parameters tuned for the smaller physical footprint EAN-8 typically occupies.

EAN-8 is a shortened version of the EAN-13 barcode, designed for use on small products where a full EAN-13 barcode would be too large. It was introduced alongside EAN-13 as part of the European Article Numbering system.

The barcode contains only 8 digits: a 2-3 digit country code, a 4-5 digit product code, and a single check digit. Due to the limited number space, EAN-8 codes are assigned by national GS1 organizations and are typically restricted to very small products.

Despite its compact size, EAN-8 maintains the same level of reliability as EAN-13. The check digit calculation is identical, ensuring data integrity at the point of sale.

Common applications include small confectionery items, cosmetics, cigarettes, and other products where space is at a premium. Manufacturers must apply for EAN-8 allocation and demonstrate that EAN-13 is not practical for their product.

Common use cases

Small-format consumer packaging

Items with limited label area, like lip balm tubes or single candy bars, use EAN-8 because a full EAN-13 code would not physically fit at a scannable size.

Confectionery and tobacco items

Individually wrapped confectionery and cigarette packs commonly carry EAN-8 codes, a category where GS1 has historically approved the largest share of EAN-8 prefix requests.

Compact retail SKUs in convenience stores

Convenience store items with minimal packaging real estate, such as travel-size toiletries, rely on EAN-8 to stay within GS1 barcode size guidelines.

Generate EAN-8 via the REST API

curl "https://api.bargen.pro/v1/barcode/ean8?data=9638507&format=svg" \
  -H "X-API-Key: YOUR_API_KEY"

Returns the barcode as SVG. See the API documentation for all options.

Frequently asked questions

How is EAN-8 different from EAN-13?

EAN-8 uses 8 digits instead of 13, giving it a much smaller numbering capacity, and it is intended specifically for packaging too small for a standard EAN-13 code. Both share the same weighted modulo-10 checksum method.

Can any business use an EAN-8 prefix?

No. GS1 issues EAN-8 prefixes only on application and reserves them for products that genuinely cannot accommodate EAN-13 due to physical size, since the format numbering capacity is limited.

Will standard retail scanners read EAN-8?

Yes, virtually all point-of-sale scanners that read EAN-13 also read EAN-8 natively, since both are core GS1 retail symbologies supported by the same scanner firmware.

Specifications

Digits
8 (including check digit)
Structure
Country + Product + Check
Check Digit
Modulo 10 (mandatory)

Availability

Available from the Free plan.

See pricing

Related formats

Start generating EAN-8 barcodes

Free tier with 1,000 API calls per month. No credit card required.