The short answer
A barcode (the classic striped kind) stores a short number, usually a product ID, and is read by the laser or image scanner at a shop till. A QR code stores much more, such as a link, WiFi login or contact card, and is read by any phone camera. Use a barcode to sell a product through retail checkouts, and a QR code to send people to information or an action.
Side by side
| Barcode (1D) | QR code (2D) | |
|---|---|---|
| Shape | Vertical bars, read in one direction | Square grid, read in two directions |
| Typical content | 8 to 14 digits (EAN, UPC) or short codes (Code 128) | Links, text, WiFi, contacts, payments, up to ~3 KB |
| Read by | Shop scanners, warehouse scanners | Any smartphone camera, plus modern image scanners |
| Read angle | Must line up roughly with the scanner | Any angle, even upside down |
| Damage tolerance | Low: a scratch through the bars can stop it | Built-in error correction, up to 30% |
| Space needed | Wide and short | Square, compact for the data it holds |
| Needs registration | Retail EAN/UPC numbers come from GS1 | No, anyone can make one |
How barcodes work
A one-dimensional barcode encodes data in the widths of black bars and white spaces. The scanner reads across the bars in a single line, so only a little data fits. The common types are:
- EAN-13 and EAN-8: the product numbers on retail goods in India, Europe and most of the world.
- UPC-A: the North American equivalent of EAN-13.
- ITF-14: printed on outer cartons and shipping cases.
- Code 128 and Code 39: letters and numbers for warehouses, libraries, shipping and asset tags.
- Codabar: older systems such as libraries and blood banks.
You can create all of these with our free barcode generator.
How QR codes work
A QR code arranges data in a grid of square modules. Three corner squares tell the camera where the code is and which way up, so it can be read from any direction. Error correction lets the code survive dirt, damage or a logo in the middle. Our guide What is a QR code? explains the structure in detail.
Do I need an EAN or UPC barcode for my product?
If you want to sell through supermarkets, chain stores or most online marketplaces, yes. Retailers look up your product by its GTIN (the number in the EAN or UPC), and those numbers must be licensed from GS1, the global standards body (GS1 India in India). A barcode generator can draw the bars for any number, but only a GS1-issued number is guaranteed to be unique and accepted by retailers.
For internal use, such as stock in your own shop, asset tags or library books, you can use Code 128 with your own numbering and skip GS1 entirely.
Can a QR code replace a barcode at the checkout?
Not yet everywhere. Many shop scanners still read only 1D barcodes. GS1's Sunrise 2027 programme aims for retail scanners to read 2D codes by the end of 2027, using a format called GS1 Digital Link: a QR code whose web address contains the product's GTIN. One code then works at the till and opens product information on a phone. Until your retailers confirm they can scan it, print the normal EAN or UPC barcode as well.
Other 2D codes you may meet
- Data Matrix: very small square codes on electronics, medicines and industrial parts. GS1 DataMatrix is used for medicine traceability. Make one with our Data Matrix generator.
- PDF417: a stacked, wide 2D barcode found on boarding passes, ID cards and shipping labels. See our PDF417 generator.
- Aztec: used on train and airline tickets; it needs no quiet zone.
Phones read QR codes natively; Data Matrix and PDF417 usually need a dedicated scanner app or Google Lens.
Which should you use?
| You want to… | Use |
|---|---|
| Sell a product in retail stores | EAN-13 or UPC-A with a GS1 number |
| Send customers to a website, menu or video | QR code |
| Share WiFi, a contact card or a UPI payment | QR code |
| Track stock, assets or parcels internally | Code 128 or Data Matrix |
| Label outer cartons for distributors | ITF-14 |
| Fit a code on a tiny part or medicine pack | Data Matrix |
Many packages carry both: an EAN barcode for the checkout and a QR code for instructions, recipes or a warranty page.
Printing both on one pack
Keep them apart so the checkout scanner doesn't hit the QR code first, and label the QR code with what it does ("Scan for recipes"). Print barcodes at their nominal size (EAN-13 is about 37 × 26 mm at 100%) and don't shrink them below about 80%. For QR codes, our size calculator suggests a size based on scanning distance.
Frequently asked questions
Is a QR code a type of barcode?
Yes. It is a two-dimensional (2D) barcode. In everyday use, "barcode" usually means the striped one-dimensional kind.
Can a phone scan a normal barcode?
Many can with Google Lens or a scanner app. Our online scanner reads EAN, UPC, Code 128 and other barcodes with your camera.
Do I have to pay for a barcode?
Drawing a barcode is free. For retail, the product number (GTIN) must be licensed from GS1, which charges a fee.
Can I use a QR code instead of an EAN barcode?
Only where the retailer's scanners read 2D codes, using GS1 Digital Link. Until then, print the EAN barcode too.
Which holds more data?
A QR code, by far: up to about 3 KB compared with roughly 13 digits in an EAN-13.
Which is more reliable when damaged?
A QR code. Its error correction can rebuild up to 30% of the code; a scratch across a barcode often makes it unreadable.