Home UPC-E

UPC-E validator

How the UPC-E format works

Format
8 digits: number-system digit (0 or 1) + 6 compressed data digits + 1 check digit
Example
04252614

Things to watch for

  • UPC-E is a zero-suppressed, space-saving encoding of a 12-digit UPC-A barcode used on small packages — this validator expands the 8 digits back to their equivalent UPC-A form and checks it with the standard GS1 mod-10 checksum
  • The zero-suppression expansion rule depends on the 6th data digit, so two UPC-E codes that look similar can expand very differently — always verify against the printed UPC-A if one is available
  • Format and checksum only — it can't confirm the barcode is actually registered to a real product by a GS1 member company
Regex for UPC-E
^[01][0-9]{7}$

UPC-E is a space-saving, zero-suppressed encoding of a full 12-digit UPC-A barcode, printed on packaging too small for the longer code to stay legible — a pack of gum, a small box of pain relievers, a bottle of nail polish. It isn’t a separate numbering scheme with its own assigned digits; it’s the same UPC-A number with runs of zeros compressed out, meant to be expanded back to its original 12-digit form the moment a scanner or a validator reads it.

How the zero-suppression expansion works

UPC-E takes a UPC-A that has a manufacturer code ending in zeros or a product code padded with leading zeros, and squeezes those redundant zeros out, leaving 6 compressed data digits sandwiched between a number-system digit and a check digit. Which expansion pattern applies depends entirely on the last of those 6 data digits: values 0-2 expand one way, 3 another, 4 another, and 5-9 yet another — each rule reconstructing the manufacturer code and product code differently. This validator reverses that process, rebuilds the 12-digit UPC-A, and checks it with the standard GS1 mod-10 checksum.

What a pass doesn’t tell you

A pass confirms the 8 digits expand into a UPC-A whose check digit is arithmetically correct — nothing about whether that number was actually assigned to a real product by GS1 or a member company. Where you have both forms, comparing the UPC-E against the printed UPC-A is the more reliable check, since expansion depends entirely on getting that one branching digit right.

Content last reviewed 2026-08-09.

UPC-E FAQ

Is a UPC-E's 8th digit a separate check digit from UPC-A's?

No — it's the same check digit. Validating a UPC-E means expanding its 6 compressed data digits back into the equivalent 12-digit UPC-A using the standard zero-suppression rules, then checking that expanded number with the ordinary GS1 mod-10 formula. The digit printed as UPC-E's 8th character carries straight through as the UPC-A's check digit, unchanged by the expansion.

Why can two similar-looking UPC-E codes expand into very different UPC-A numbers?

Because the expansion rule branches on the 6th data digit, not a fixed formula applied uniformly. A UPC-E ending in 0, 1, or 2 expands differently than one ending in 3, which expands differently again than one ending in 4-9 — each pattern redistributes the 6 compressed digits into the 12-digit form differently. If a scan or manual entry misreads that one digit, the whole expansion goes wrong even though the code still looks plausible.

Is UPC-E the same thing as EAN-8?

No, even though both are 8 digits on small packaging. EAN-8 is its own independent GS1 numbering scheme with its own directly-assigned digits. UPC-E isn't a separate number space at all — it's a compressed encoding of an existing 12-digit UPC-A, meant to be expanded back to that UPC-A whenever it's looked up, rather than treated as a barcode number in its own right.

← More UPC-E validators