UPC-E Barcode Generator API
Zero-suppressed UPC for small packages
Sample UPC-E barcode
Generated live by the BarGen API from 0123456
UPC-E is a zero-suppressed, compressed form of UPC-A designed for small packages where a full 12-digit symbol will not fit. It represents the same underlying product data in as few as 6 visible digits by omitting predictable zeros from the manufacturer and product code fields, then expanding them back to a full UPC-A number during decoding. Scanners that support UPC-A generally support UPC-E as well, since the expansion logic is defined in the same GS1 specification.
BarGen accepts a 6 to 8 digit UPC-E string with format set to upce and expands or validates it against the underlying UPC-A number as needed, returning SVG for compact packaging artwork or PNG for previews. Because UPC-E compression rules depend on specific digit patterns, BarGen validates that the supplied data can be losslessly expanded before rendering.
UPC-E is a compressed version of UPC-A, designed for small packages where space is limited. It uses "zero suppression" to encode a 12-digit UPC-A code in just 6 visible digits plus a check digit.
The compression works by removing zeros from specific positions in the UPC-A code. Only UPC-A codes with zeros in certain positions can be converted to UPC-E format. The scanner automatically expands UPC-E back to UPC-A for processing.
Despite its compact size, UPC-E maintains full compatibility with UPC-A systems. The same product information is encoded, just in a smaller space. This makes it ideal for small items that need to be tracked through the same supply chain as larger products.
Common applications include small health and beauty products, candy bars, single-serve beverages, and any product where a standard UPC-A barcode would dominate the package design.
Common use cases
Small consumer packaging
Items like chewing gum packs, travel-size cosmetics, and single-serve snacks use UPC-E when there is not enough label area for a full UPC-A symbol.
Health and beauty small SKUs
Cosmetic sample sizes and pharmacy small-format products commonly carry UPC-E codes to stay within tight label dimensions while remaining scannable at standard checkout.
Compact retail displays
Point-of-sale impulse items near checkout counters, such as mints or batteries, frequently use UPC-E due to their reduced packaging footprint.
Generate UPC-E via the REST API
curl "https://api.bargen.pro/v1/barcode/upce?data=0123456&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 does UPC-E compress a 12-digit UPC-A code?
UPC-E applies zero-suppression rules to the manufacturer and product code digits of a UPC-A number, dropping predictable trailing or leading zeros based on the value of the last digit, then reconstructs the full 12-digit code during decoding.
Can every UPC-A code be converted to UPC-E?
No. Only UPC-A codes that fit specific digit patterns, generally those with manufacturer codes ending in 0, 1, or 2, or with certain trailing zero patterns in the product code, can be losslessly compressed into UPC-E.
Do UPC-E and UPC-A scan to the same product data?
Yes. Scanners automatically expand a UPC-E code back into its full 12-digit UPC-A equivalent, so point-of-sale and inventory systems treat both formats as identical once decoded.
Start generating UPC-E barcodes
Free tier with 1,000 API calls per month. No credit card required.