Free Barcode Prefix Checker

The first three digits of a barcode identify the GS1 member organisation that issued the number — not where the product was made. Paste a number to see what it really says, and what it does not. Nothing leaves your browser.

The digits printed under the bars — 8, 12, 13 or 14 of them. Spaces and hyphens are fine.

Press Enter to check. Everything runs in your browser — the number is never sent anywhere.

Try:

How the check works

Two separate calculations run on the number you paste, and it is worth keeping them apart.

1. The check digit

The last digit of a GTIN is arithmetic, not data. Take every other digit from the right, starting with the one immediately left of the check digit, multiply those by 3 and the rest by 1, add the lot up, then subtract the total from the next multiple of ten. Worked through for 5901234123457:

Digits (check digit removed) Weighted sum Check digit
590123412345 83 90 − 83 = 7 ✓

If that digit does not match, the number was mistyped or misread — there is nothing to look up. Our barcode validator covers the same arithmetic across more formats.

2. The prefix

The first three digits are matched against GS1's published allocation of prefix ranges to member organisations. Where those three digits sit depends on the format, which is where most lookups go wrong:

  • EAN-13 — the first three digits, straightforwardly.
  • UPC-A — a 12-digit UPC-A is a 13-digit GTIN with an implied leading zero, so 036000291452 is read as 0036000291452 and the prefix is 003, not 036.
  • GTIN-14 / ITF-14 — the first digit is a packaging-level indicator for the case or pallet, so the prefix starts at the second digit.
  • EAN-8 — short numbers come from a separate pool for small packaging.

Some ranges are not countries at all. Numbers starting 978 or 979 are books, 977 is a serial publication, 20–29 and 200–299 are store-internal codes that never leave one retailer, and several high ranges are coupons. The checker names those rather than pretending they are a nationality.

When this is useful

  • Sanity-checking a claim about a product. A number circulating with a country attached to it is usually the prefix being read as origin. This tells you what the prefix actually is and what it is evidence of — which is a good deal less than the claim needs.
  • Working out why a lookup failed. A barcode that returns nothing from a product database is often a restricted-circulation number, printed by the shop for a loose or weighed item. Those are meaningless outside that retailer, and no database will ever have them.
  • Before you buy a barcode. Resellers sell numbers from old prefix blocks. Seeing which member organisation a number traces to, and whether the check digit is even valid, is a five-second test worth doing first.
  • Debugging an integration. If a scan produces a GTIN-14 and your lookup expects a GTIN-13, the indicator digit is the usual culprit. Our GTIN converter moves a number between lengths properly.
  • Finding the real origin field. The GS1 system does record country of origin — but in application identifier (422) inside a GS1-128 or GS1 DataMatrix, not in the retail prefix. Our GS1 barcode decoder reads those.

The background, including why the country-of-origin reading took hold and what does establish origin, is in barcode country codes: what the first digits actually tell you.

Frequently Asked Questions

Does the barcode tell you which country a product was made in?

No, and this is the most persistent misconception about barcodes. The prefix identifies the GS1 member organisation that issued the number to the brand owner, which normally reflects where that company registered rather than where anything was manufactured. GS1 states plainly that its prefixes do not identify a product’s country of origin, because member companies can and do manufacture anywhere in the world. A company registered in one country routinely makes its goods in another, and the barcode does not change when production moves.

What do the first three digits of a barcode actually mean?

They are the GS1 prefix, and they record which GS1 member organisation allocated the company prefix that the number was built from. Think of it as the issuing registry, in the same way that the bank identifier at the start of a card number tells you who issued the card rather than where you are standing. Some ranges are not national at all — 978 and 979 are books, 977 is a serial publication, and several ranges are reserved for coupons or for numbers that never leave a single shop.

Why does my UPC give a different prefix than I expected?

Because a 12-digit UPC-A is really a 13-digit GTIN with a leading zero that is not printed. The prefix has to be read from the padded form, so 036000291452 is analysed as 0036000291452 and the prefix is 003, not 036. Tools that slice the first three digits off the unpadded number report the wrong range. This checker pads first.

What does it mean if the check digit is invalid?

It means the number is wrong rather than the product being suspicious. The final digit is derived arithmetically from the others, so a mistyped or misread digit almost always breaks it. When the check digit fails there is nothing meaningful to look up, because the prefix you are reading may not be the prefix that was printed. Correct the number and check again.

Why did my barcode return no country at all?

Usually because it is not a product number. Ranges 20–29 and 200–299 are restricted-circulation numbers that a retailer prints for its own use — loose fruit, the deli counter, items packed in store. They are not globally unique, they belong to no country, and no product database will ever recognise them. The other common case is a prefix that has not been allocated, or has been allocated since this table was compiled.

Where is the real country of origin recorded?

For consumers, on the packaging: country-of-origin marking is a legal requirement in most major markets, and it is determined by customs rules on where the last substantial transformation took place, not by who owns the brand. In the GS1 data system itself there is a dedicated field — application identifier (422) carries the country of origin inside a GS1-128 or GS1 DataMatrix on trade packaging. That is a genuine origin field. The retail prefix is not.

Can I trust apps that tell me a product’s country from its barcode?

Treat the country they display as the registration country, not the manufacturing country, whatever the app calls it. Several popular apps derive it straight from the GS1 prefix, which means they inherit the misconception wholesale. Fact-checkers have repeatedly addressed viral claims built this way, including claims about specific prefixes such as 729, 841 and 871. The prefix is real data; the conclusion drawn from it is the problem.

Is my barcode number sent to a server?

No. The lookup table and the check-digit arithmetic are plain JavaScript that ship with the page and run in your browser, with no network request, no logging and no storage. Reload the page and nothing remains. That also means the tool works offline once loaded, and that it cannot tell you the product name — a name requires a database lookup, which requires sending the number somewhere.

Does this work on 8-digit and 14-digit barcodes?

Yes. EAN-8, UPC-A, EAN-13 and GTIN-14 or ITF-14 are all accepted and each is handled on its own terms. On a GTIN-14 the first digit is a packaging-level indicator for a case or pallet, so the prefix begins at the second digit; slicing the first three digits of a GTIN-14 gives a meaningless answer. EAN-8 numbers come from a separate short-number pool for packaging too small to carry a full EAN-13.

Read the Number Off the Product Itself

This checker works on the digits, and the fastest way to get the digits off a real package is to scan it. Scan & Generate reads EAN-13, UPC-A, EAN-8 and ITF-14 along with QR, Data Matrix, PDF417 and six more formats — 13 in all — and shows you the raw contents as text. Scan the product in front of you, then check what its prefix does and does not prove.