Barcodes and QR codes
UPC, EAN, ISBN, QR, Data Matrix and the other codes on products, books, boxes and tickets: what each one is and what its numbers and patterns mean.
Test yourself: Barcodes and QR codes quiz
Shop barcodes 6 symbols
Books and magazines 2 symbols
Boxes, shipping and industry 3 symbols
About barcodes and QR codes
Most barcodes in a shop carry one thing: a product number. The digits printed under the bars are that number. A UPC-A has 12 of them and an EAN-13 has 13: a company prefix that a national GS1 organisation licenses to the brand owner, the company’s number for the item, and a check digit worked out from the rest. GS1 says the company prefix makes the number unique worldwide but does not identify the origin of the item.
The first digits aren’t a country of origin
The first two or three digits of an EAN-13 are the GS1 Prefix: 690 to 699 are GS1 China’s, 890 GS1 India’s. They show which GS1 office issued the company’s number. GS1’s own list says its prefixes do not identify the country of origin for a given product, since companies can manufacture products anywhere in the world, and PolitiFact rated the claim that 690 means made in China Mostly False.
Books, magazines and fruit
Books use an EAN-13 beginning 978 or 979, “Bookland”, with the ISBN inside it and sometimes a five-digit price add-on beside it (ISBN barcodes). Magazines with an ISSN begin 977 and add a two-digit issue number (ISSN barcodes). On loose fruit and vegetables, the 4- or 5-digit number on the sticker is a PLU code from IFPS: four digits for conventionally grown, a 9 in front for organic.
Boxes and labels
Cartons carry ITF-14 in a thick frame, a 14-digit number for the case rather than the item. Shipping labels use Code 128 and GS1-128, and older industrial labels Code 39.
Two-dimensional codes
A QR code is found by the three squares in its corners; Denso Wave announced it in 1994, and where Denso Wave puts a barcode’s limit at about 20 characters, a QR code holds up to 7,089 digits at its largest. A Data Matrix code has a solid L along two edges, and the FDA requires one on US prescription drug packages. PDF417 is the stacked barcode on the back of a driver’s license and on paper boarding passes.
The drawings on these pages show how each code is laid out; they are not working codes and don’t encode anything.
Sources
- GS1 Company Prefix, GS1 Prefix list, GS1 AISBL, Prefix table
- GS1 General Specifications Standard, Release 26.0, ratified January 2026, GS1 AISBL, §2.1.3.1; §5.1.1; §5.7.2
- Barcode won’t tell you if product was made in China, PolitiFact, 23 April 2020, PolitiFact (Poynter Institute), Rating
- ISSN and Bar Codes, U.S. ISSN Center, Library of Congress, UPC and EAN
- PPA Best Practice for Bar Code Guidelines, Bar coding and issue numbering of magazines, Professional Publishers Association (UK), Introduction
- PLU Codes, What is a PLU Code?, International Federation for Produce Standards (IFPS), What is a PLU Code?
- History of QR Code, QRcode.com, DENSO WAVE, Section 2
- What is a QR code? | Basics of 2D codes, Barcode Information & Tips, KEYENCE Corporation, Structure
- Product Identifiers Under the Drug Supply Chain Security Act: Questions and Answers, Guidance for Industry, June 2021, U.S. Food and Drug Administration, Question 3
- 2020 AAMVA DL/ID Card Design Standard, Version 1.0, Annex A and Annex D, American Association of Motor Vehicle Administrators, D.3
- Bar Coded Boarding Pass (BCBP) Implementation Guide, Version 7, 2 March 2021, International Air Transport Association, §1.2.1
- CODE 39 and Codabar | Basics of Barcodes, Barcode Information & Tips, KEYENCE Corporation, CODE 39
Researched, edited and approved by Rory Hansen before publishing. Last reviewed October 9, 2026. How we research