Retail stores like Walmart and 7-Eleven are the best places to understand barcodes. Each product selling in the store should have a barcode and the machine or person scans the code to collect money from you. Do you know that barcode printed on the product has a standard and it is easy to find the product details by checking the digits below the code? In this article, let us explore how to read barcodes to find various hidden details.
Barcode Structure
Barcodes are more than just lines and numbers – they hold information about a product, its origin and the manufacturer. Though there are many formats available, EAN-13 (European Article Number) is the commonly used system. These codes are administered by GS1, a global organization that standardizes barcoding practices and uses a 13-digit code divided into multiple parts.
| Digits | Name | Purpose |
|---|---|---|
| 1-3 | Prefix Code | Country or region where the barcode was registered. |
| 4-7 | Manufacturer Code | Identifies the company or manufacturer. |
| 8-12 | Product Code | Specifies the product within the manufacturer’s catalog. |
| 13 | Check Digit | Verifies the barcode’s validity to prevent scanning errors. |

Reading a Barcode
Let’s take an example barcode: 500123456789X and here is how to read it:
- 500 indicates the country where the barcode is registered which is the United Kingdom.
- 1234 is manufacturer code uniquely represents a company registered in the country indicated by the prefix.
- Product code of 56789 might represent a specific type of toothpaste within the manufacturer’s catalog.
- Last digit X is a check digit calculated using a specific mathematical formula.
How the Check Digit is Calculated?
Though the last check digit does not have any meaning, is an important part of the barcode and ensures data integrity. It ensures that the complete barcode can be scanned correctly and below is how it is calculated for an EAN-13 barcode:
- Multiply all digits in odd positions (except the check digit) by 1 and add them.
- Multiply all digits in even positions by 3 and add them.
- Add the results from steps 1 and 2.
- Find the smallest number that, when added to this sum, results in a multiple of 10. This number is the check digit.
Calculating Check Digit
Let’s take an example barcode 400638133393X to calculate the check digit X using the above logic:
- Odd-position digits: 4 (1st), 0 (3rd), 3 (5th), 1 (7th), 3 (9th), 9 (11th) and the sum after multiplying each digit by 1 is → 4 + 0 + 3 + 1 + 3 + 9 = 20.
- Even-position digits: 0 (2nd), 6 (4th), 8 (6th), 3 (8th), 3 (10th), 3 (12th) and the sum after multiplying each digit by 3 is → (0 x 3) + (6 x 3) + (8 x 3) + (3 x 3) + (3 x 3) + (3 x 3) = 69.
- Total sum: 20 + 69 = 89
- The smallest number X such that 89 + X is a multiple of 10 which means 89 + X = 90 and hence X = 1.
So, the check digit X for the barcode 400638133393X is 1 and the complete barcode will look like 4006381333931.
Complete List of GS1 Country Codes
Here is a detailed list of barcode prefix codes and the countries they represent as per GS1. Codes such as 020-029 and 200-299 are restricted for a purpose and other unallocated ranges are reserved for future use by GS1 global office.
| Prefix Code / Range | Country / Region |
|---|---|
| 001–019 | USA |
| 020–029 | GS1 Restricted Distribution (within a geographical region) |
| 030–039 | USA (Specific Purposes for Drugs) |
| 040–049 | GS1 Restricted Distribution (within a company) |
| 050–059 | GS1 Reserved for future use in USA |
| 060–099 | USA |
| 100–139 | USA |
| 200–299 | GS1 Restricted Distribution (within a geographical region) |
| 300–379 | France and Monaco |
| 380 | Bulgaria |
| 383 | Slovenia |
| 385 | Croatia |
| 387 | Bosnia and Herzegovina |
| 389 | Montenegro |
| 400–440 | Germany |
| 450–459 | Japan |
| 460–469 | Russia |
| 470 | Kyrgyzstan |
| 471 | Taiwan |
| 474 | Estonia |
| 475 | Latvia |
| 476 | Azerbaijan |
| 477 | Lithuania |
| 478 | Uzbekistan |
| 479 | Sri Lanka |
| 480 | Philippines |
| 481 | Belarus |
| 482 | Ukraine |
| 484 | Moldova |
| 485 | Armenia |
| 486 | Georgia |
| 487 | Kazakhstan |
| 488 | Tajikistan |
| 489 | Hong Kong |
| 490–499 | Japan |
| 500–509 | United Kingdom |
| 520–521 | Greece |
| 528 | Lebanon |
| 529 | Cyprus |
| 530 | Albania |
| 531 | North Macedonia |
| 535 | Malta |
| 539 | Ireland |
| 540–549 | Belgium and Luxembourg |
| 560 | Portugal |
| 569 | Iceland |
| 570–579 | Denmark, Faroe Islands and Greenland |
| 590 | Poland |
| 594 | Romania |
| 599 | Hungary |
| 600–601 | South Africa |
| 603 | Ghana |
| 604 | Senegal |
| 605 | Uganda |
| 606 | Angola |
| 607 | Oman |
| 608 | Bahrain |
| 609 | Mauritius |
| 611 | Morocco |
| 613 | Algeria |
| 615 | Nigeria |
| 616 | Kenya |
| 617 | Cameroon |
| 618 | Ivory Coast |
| 619 | Tunisia |
| 620 | Tanzania |
| 621 | Syria |
| 622 | Egypt |
| 623 | GS1 Reserved for future global use (used for Brunei till 2021) |
| 624 | Libya |
| 625 | Jordan |
| 626 | Iran |
| 627 | Kuwait |
| 628 | Saudi Arabia |
| 629 | United Arab Emirates |
| 630 | Qatar |
| 631 | Namibia |
| 632 | Rwanda |
| 640–649 | Finland |
| 680-681 | China |
| 690–699 | China |
| 700–709 | Norway |
| 729 | Israel |
| 730–739 | Sweden |
| 740 | Guatemala |
| 741 | El Salvador |
| 742 | Honduras |
| 743 | Nicaragua |
| 744 | Costa Rica |
| 745 | Panama |
| 746 | Dominican Republic |
| 750 | Mexico |
| 754–755 | Canada |
| 759 | Venezuela |
| 760–769 | Switzerland and Liechtenstein |
| 770–771 | Colombia |
| 773 | Uruguay |
| 775 | Peru |
| 777 | Bolivia |
| 778–779 | Argentina |
| 780 | Chile |
| 784 | Paraguay |
| 786 | Ecuador |
| 789–790 | Brazil |
| 800–839 | Italy, San Marino and Vatican City |
| 840–849 | Spain and Andorra |
| 850 | Cuba |
| 858 | Slovakia |
| 859 | Czech Republic |
| 860 | Serbia |
| 865 | Mongolia |
| 867 | North Korea |
| 868–869 | Turkey |
| 870–879 | Netherlands |
| 880–881 | South Korea |
| 883 | Myanmar |
| 884 | Cambodia |
| 885 | Thailand |
| 888 | Singapore |
| 890 | India |
| 893 | Vietnam |
| 894 | Bangladesh |
| 896 | Pakistan |
| 899 | Indonesia |
| 900–919 | Austria |
| 930–939 | Australia |
| 940–949 | New Zealand |
| 950 | GS1 Global Office |
| 951 | Used by GS1 General Manager Numbers |
| 952 | GS1 Demo System |
| 955 | Malaysia |
| 958 | Macau |
| 960–9624 | GS1 UK Office |
| 9625–9626 | GS1 Poland Office |
| 9627-969 | GS1 Global Office |
| 977 | ISSN Serial Publications |
| 978–979 | International Standard Book Number (ISBN) and International Standard Music Number (ISMN) |
| 980 | Refund Receipts |
| 981–983 | Coupons for Common Currency Areas |
| 990–999 | Coupons |
Can We Identify Product’s Origin Country from Barcode?
The answer is No. Though the prefix country code in general indicates the origin country of the product, it is not the case always.
- Country code identifies the barcode’s registration location of the manufacturer and not necessarily where the product was manufactured.
- Companies can purchase licenses of prefix codes from the GS1 organization for distributing the products.
So, you should read the label on the product to find the origin country instead of trying to assume it from the barcode.
Other Barcode Formats
As mentioned, there are many other barcodes formats available and here are some of the popular ones:
- QR Codes – A two-dimensional barcode used for encoding larger amounts of data (e.g., URLs, product details) and can be scanned using smartphones.
- ISBN (International Standard Book Numbers) – An ISBN is a unique 13-digit (earlier version used 10-digit) identifier specifically assigned to books, eBooks, and other literary publications to facilitate cataloging and sales in the publishing industry. Generally, ISBN code is embedded in an EAN-13 barcode, enabling bookstores and libraries to scan it.
- UPC (Universal Product Code) – A 12-digit code used primarily in the United States and Canada. 1 digit is a number system (indicates product type, e.g., standard product, coupon). Next 5 digits indicate the manufacturer code, further 5 digits indicate product code and the final digit is a check digit.
- ITF-14 – A 14-digit barcode used for packaging or shipping which often encodes a Global Trade Item Number (GTIN).
Conclusion
Barcodes are complex systems that encode important product information into a simple visual format. By understanding the structure and meaning of each component, consumers and businesses can trace the possible origin, manufacturer, and details of a product easily. Whether you are scanning groceries or verifying a shipment, knowing how to read and interpret barcodes can help to enhance transparency and accuracy in product identification.





