Barcode Basics

How to Read a Barcode: What the Numbers and Bars Tell You

Learn which UPC-A digits to copy, what guard bars and the check digit do, and what a barcode number cannot tell you by itself.

Share
Table of contents

To read a UPC-A barcode by eye, start with the printed digits beneath the bars. Copy all 12 digits, including the small digit at each end and any leading zero. Those digits are the human-readable form of the product identifier; use the complete number to search a suitable catalog or enter it in the relevant system. You can also study the bar patterns, but their interpretation depends on the barcode type.[1]

Find all 12 digits on a UPC-A symbol

A UPC-A symbol commonly appears on US retail packaging. GS1’s example shows 0 12345 00005 8: write it as 012345000058 when a field asks for the complete 12-digit number.[1] The first and last digits may sit outside the main groups, but they are still part of the number.

In that same example:

  • The black bars and light spaces carry the encoded pattern.
  • Clear areas at the left and right are quiet zones; keep them unobstructed when printing or scanning.
  • Guard patterns appear at the beginning, center and end of the symbol. They help define its structure; they are not extra digits to type.
  • The last digit, 8, is the check digit.[1]

This is a published standards example. It is not a product lookup or a scan performed for this article. If the printed text is damaged or unclear, use a compatible scanner or ask the label issuer rather than guessing.

What do those digits mean?

The full UPC-A number is a GTIN-12: a product identifier used by systems to find the associated record.[2] The last digit is calculated from the preceding digits and helps detect some composition or transcription errors. A valid check digit does not prove that the number belongs to the item in your hand or that the item is authentic.

Do not assume a fixed number of digits always identifies a manufacturer and a fixed number identifies a product. Assignment structures can vary. Nor should you treat a prefix as proof of where an item was made; GS1 says its EAN-13 prefixes do not establish the country of manufacture.[3] To identify a product, search the complete number in an appropriate source and compare the result with the package.

Check the example’s last digit

For 012345000058, take the first 11 digits. Add the digits in positions 1, 3, 5, 7, 9 and 11: 0 + 2 + 4 + 0 + 0 + 5 = 11. Multiply by 3 to get 33. Add positions 2, 4, 6, 8 and 10: 1 + 3 + 5 + 0 + 0 = 9. The total is 42; the number needed to reach the next multiple of 10 is 8, matching the printed last digit. The GS1 check-digit method uses alternating weights and a final digit that makes the total a multiple of ten.[1]

This check confirms the arithmetic, not registration or product identity. If it fails, recheck every digit and make sure you have a UPC-A number rather than a different format.

Can you read the bars without the printed numbers?

Yes, in principle, if the symbol is clear and you know its symbology. UPC-A uses a left quiet zone, a guard pattern, six encoded characters, a center guard, six more encoded characters, an end guard and a right quiet zone.[1] Each side uses its own digit patterns. You must measure both bars and spaces and use the correct reference patterns; simply counting the black lines is not enough. Other barcode types use different rules.

For a practical task, a compatible scanner is usually easier. Compare its full output with the printed digits or an authoritative record. Some systems represent the same UPC-A data with an additional leading zero in a 13-digit form, so check the system’s formatting before concluding that one result is different.[1]

When the result is unclear

  • Different digit count: Confirm the type before applying the 12-digit UPC-A steps. UPC-E and EAN symbols have different representations.
  • Numbers match but no product appears: The scan or manual entry may be correct while the chosen database lacks the record. Try the relevant retailer or publisher, or a GS1 lookup for a GTIN.
  • Result describes the wrong item: Check every digit, package size and edition or variant. Ask the issuer when records still conflict.
  • The code is torn or unreadable: Use a clean original or request the correct data. Do not reconstruct missing digits from a plausible product match.

References

[1] GS1. GS1 General Specifications, Release 24.0, sections 5.2.2.3 and 7.9.1, and Figure 5.2.2.3-1. https://ref.gs1.org/standards/genspecs/24.0.0/

[2] GS1 US. How to Translate a UPC to a GTIN to an SGTIN to an EPC. https://documents.gs1us.org/adobe/assets/deliver/urn%3Aaaid%3Aaem%3Abf0e5825-0198-453f-b36f-54ba3989f08e/How-to-Translate-a-UPC-to-a-GTIN-to-an-SGTIN-to-an-EPC.pdf

[3] GS1. Does the GS1 Prefix show the country of origin? https://support.gs1.org/support/solutions/articles/43000734188