Xerobit

UPC-E Barcode Generator

Enter 6, 7 or 8 digits to generate a UPC-E barcode with automatic zero suppression and check digit calculation. This upc e barcode generator draws a scalable SVG directly in your browser without uploading any data.

Barcode

01234565
01234565
  • Encoded
    01234565
  • UPC-A equivalent
    012345000065
  • Number system
    0
  • Payload digits
    123456
  • Check digit
    5
  • Parity pattern
    EOOEEO

By · Published · How we build and test tools

How to use the upc-e barcode generator

  1. Enter 6, 7 or 8 digits into the input field of this upc e barcode generator.
  2. If you provide 6 digits, the tool assumes number system 0 and calculates the check digit automatically.
  3. If you provide 8 digits, it validates the check digit and encodes the symbol using parity patterns.
  4. Choose a white or transparent background for the SVG.
  5. Click Generate to render the UPC-E barcode and view the encoded details below it.

How UPC-E zero suppression works

UPC-E compresses a 12-digit UPC-A code into 8 digits by removing zeros according to strict rules. The first digit is the number system (0 or 1), the next six are the payload, and the last is the check digit. Which zeros can be dropped depends on how the manufacturer and product codes end.

The four compression patterns, with the UPC-E payload digits written d1 to d6:

  • Manufacturer code ends in 000, 100 or 200 and the product code is 00000 to 00999: payload is the first two manufacturer digits, the last three product digits and the third manufacturer digit (0, 1 or 2).
  • Manufacturer code ends in 00 (but not 000, 100 or 200) and the product code is 00000 to 00099: payload is the first three manufacturer digits, the last two product digits and a 3.
  • Manufacturer code ends in 0 (but not 00) and the product code is 00000 to 00009: payload is the first four manufacturer digits, the last product digit and a 4.
  • Manufacturer code has no trailing zero and the product code is 00005 to 00009: payload is the five manufacturer digits followed by the product digit (5 to 9).

For example, the UPC-A code 0-12000-00345-5 has manufacturer code 12000 and product code 00345, which fits the first pattern, so its UPC-E payload is 123450 and the 8-digit UPC-E is 01234505. This upc e barcode generator works in the other direction: you give it the UPC-E digits and it shows the UPC-A equivalent.

Check digit calculation

The check digit uses the standard modulo 10 algorithm applied to the expanded UPC-A representation. Starting from the leftmost data digit, odd positions (1st, 3rd, 5th, etc.) are multiplied by 3 and even positions by 1. The sum of these products is taken modulo 10, and the check digit is the amount needed to reach the next multiple of 10.

For the 6-digit payload 123456 under number system 0, the last payload digit is 6, so the full UPC-A expansion is 0-12345-00006-C. The weighted sum over the 11 data digits is 0x3 + 1x1 + 2x3 + 3x1 + 4x3 + 5x1 + 0x3 + 0x1 + 0x3 + 0x1 + 6x3 = 45. Since 45 mod 10 equals 5, the check digit is (10 - 5) mod 10 = 5. This same check digit appears at the end of the 8-digit UPC-E code 01234565 produced by this upc e barcode generator.

Parity encoding table

Unlike UPC-A, which encodes every digit with the same bar pattern, UPC-E uses two sets of patterns: odd (A) and even (B). The check digit determines which combination of odd and even patterns applies to each of the six payload digits. This is how the check digit information is preserved without an extra bar.

Check digitPattern (positions 1 to 6)
0EEEOOO
1EEOEOO
2EEOOEO
3EEOOOE
4EOEEOO
5EOOEEO
6EOOOEE
7EOEOEO
8EOEOOE
9EOOEOE

E stands for even parity and O for odd parity. Number system 1 inverts this mapping so that every E becomes O and every O becomes E.

When to use UPC-E

UPC-E is designed for small packages where a full-size EAN-13 or UPC-A barcode would not fit. Common applications include cosmetics, chewing gum packets, small electronic components and pharmaceutical blister packs. Retail point-of-sale scanners expand the UPC-E back to UPC-A internally before looking up the product.

If your product requires a full 12-digit code without compression, use a standard UPC generator instead. For books, the ISBN barcode generator handles the specific prefix requirements of the publishing industry.

SVG structure and dimensions

The generated SVG uses a module width of 2 units per bar element. A complete UPC-E symbol contains a start guard (101), six encoded digits (7 modules each, totaling 42), and an end guard (010101). This gives 51 bar modules. With a quiet zone of 9 modules on each side, the total width is 69 modules, or 138 SVG units at a scale factor of 2.

The bars extend 46 units in height, while the guard bars extend to 51 units to provide visual alignment markers. Text is rendered below the bars at a readable font size, showing the number system digit on the left, the six payload digits centered, and the check digit on the right.

Worked examples

ExampleInputResult
7 digits with checkDigits (6, 7 or 8): 0123456; Background: whiteEncoded: 01234565; UPC-A equivalent: 012345000065; Number system: 0; Payload digits: 123456; Check digit: 5; Parity pattern: EOOEEO
6 payload digitsDigits (6, 7 or 8): 123456; Background: whiteEncoded: 01234565; UPC-A equivalent: 012345000065; Number system: 0; Payload digits: 123456; Check digit: 5; Parity pattern: EOOEEO
Full 8-digit UPC-EDigits (6, 7 or 8): 01234565; Background: whiteEncoded: 01234565; UPC-A equivalent: 012345000065; Number system: 0; Payload digits: 123456; Check digit: 5; Parity pattern: EOOEEO
Number system 1Digits (6, 7 or 8): 1234567; Background: transparentEncoded: 12345670; UPC-A equivalent: 123456000070; Number system: 1; Payload digits: 234567; Check digit: 0; Parity pattern: OOOEEE

FAQ

What is the difference between UPC-A and UPC-E?

UPC-A encodes 12 digits using fixed bar patterns, while UPC-E compresses those 12 digits into 8 by removing zeros and encoding the check digit through alternating bar parities. UPC-E takes roughly half the physical space.

Can I enter 6 digits into this UPC-E barcode generator?

Yes. When you enter exactly 6 digits, the tool assumes number system 0, expands the code to UPC-A format, computes the check digit, and then encodes it as a valid UPC-E symbol.

Why does my 8-digit input get rejected?

An 8-digit input must start with 0 or 1, contain only digits, and have a valid check digit. If the check digit does not match the computed value, the input is rejected to prevent generating scannable but incorrect barcodes.

Does this tool upload my data to a server?

No. All calculations and SVG rendering happen entirely in your browser. Nothing is transmitted over the network.

What do the E and O parity patterns mean?

E (even) and O (odd) refer to two different sets of bar-space patterns used to encode each digit. The sequence of E and O across the six digits implicitly carries the check digit information, eliminating the need for a separate check digit bar.

Can UPC-E encode letters or special characters?

No. UPC-E is strictly numeric. It can only encode digits 0 through 9. If you need alphanumeric support, consider Code 128 or Code 39 instead.