Quick answer
Barcode types fall into one-dimensional and two-dimensional codes. 1D barcodes such as EAN-13 and Code 128 store a few characters in bars and appear on products and parcels. 2D codes such as QR, Aztec, PDF417 and Data Matrix store far more data in dots or blocks. Apple Wallet supports QR, PDF417, Aztec and Code 128; for loyalty cards in a shop, a QR code is usually the best choice.
Key takeaways
- Two families: 1D barcodes (EAN, Code 128) and 2D codes (QR, Aztec, PDF417, Data Matrix).
- Capacity: 1D codes typically hold a few dozen characters, a QR code more than 4,000 alphanumeric characters.
- Wallet formats: Apple Wallet supports QR, PDF417, Aztec and Code 128; Google Wallet adds others such as EAN-13.
- The scanner matters: 2D codes and codes on phone screens need a camera-based scanner; old laser scanners cannot read them.
- Rule of thumb: QR for anything customers scan with their phone; Code 128 or EAN only if your till requires it.
Barcode types fall into two families: one-dimensional barcodes, which store data in bars of different widths, and two-dimensional codes, which store data in a pattern of dots or squares. Well-known 1D codes are EAN-13 and Code 128; well-known 2D codes are the QR code, Aztec, PDF417 and Data Matrix. Which one fits depends on how much data it needs to hold and what will scan it.
What are barcodes?
A barcode is a machine-readable representation of data, usually a number. The scanner reads the pattern and passes the characters on to a system: the till, warehouse software or an app. Often the barcode only holds an ID, while the actual information sits in a database.
- 1D barcodes (linear): a single row of bars and spaces. Compact and robust, but with little room for data.
- 2D barcodes: a pattern across an area, with much more capacity and built-in error correction. They remain readable even if part of the code is dirty or covered.
The main barcode types compared
| Barcode | Type | Capacity (approx.) | Typical use | In Apple Wallet |
|---|---|---|---|---|
| EAN-13 | 1D | 13 digits | Retail products | No |
| Code 128 | 1D | A few dozen characters | Shipping, warehousing, customer numbers | Yes |
| QR code | 2D | Up to 4,296 alphanumeric characters | Marketing, tickets, loyalty cards | Yes |
| Aztec | 2D | Up to about 3,000 alphanumeric characters | Mobile rail and flight tickets | Yes |
| PDF417 | 2D (stacked) | Up to about 1,800 alphanumeric characters | Printed boarding passes, ID cards | Yes |
| Data Matrix | 2D | Up to about 2,300 alphanumeric characters | Postage, industry, pharmaceuticals | No |
These are maximum values. In practice, the more data a code holds, the larger and harder to scan it becomes.
How each code works
QR code
The QR code was developed in 1994 by Denso Wave in Japan and is standardised as ISO/IEC 18004. You recognise it by the three large squares in its corners. It offers four error-correction levels, from roughly 7% to roughly 30% of recoverable data. Every current phone camera reads it without an extra app.
Aztec code
The Aztec code has its finder pattern in the centre and needs no white border (quiet zone). That means it scans even when shown small or close to the edge of a screen. Many mobile train and flight tickets use it, including those from Deutsche Bahn.
PDF417
PDF417 looks like several barcodes stacked on top of each other. It is wide and flat, which suits boarding passes or the back of ID cards. On small phone screens it is less practical than QR or Aztec.
Code 128 and EAN-13
Code 128 is a flexible 1D code for letters and digits. EAN-13 identifies products worldwide, with numbers issued by GS1. Both can be read by simple laser scanners, which is why they are so common at tills and in warehouses.
Example from a shop
A concept store in Amsterdam with a till and a handheld scanner works out which codes it needs:
- Products: the goods already carry EAN-13 codes from the manufacturer. Nothing changes here.
- Instagram link in the window: a QR code, because passers-by scan it with their phone camera. Tips on sizing are in our guide to QR code size for print.
- Loyalty card in the wallet: QR or Aztec, because it is shown on a phone screen.
- Check the scanner: the old laser scanner cannot read phone screens. To scan wallet cards at the till, you need a 2D imager.
Which code works better for loyalty cards specifically is covered in detail in barcode vs. QR code for loyalty cards.
Barcodes in Apple and Google Wallet
At its core, a wallet card is a file with a design, text and a barcode. For Apple, that is the PKPASS file. According to Apple’s developer documentation, Apple Wallet supports exactly four formats: QR, PDF417, Aztec and Code 128. Google Wallet can display additional formats such as EAN-13 or Data Matrix.
If you want one card for both platforms, pick a format both support, which in practice usually means QR. How scanning works at the counter is explained in how to scan a wallet pass. Besides barcodes, wallet cards can also be read via NFC, but that needs special readers and approvals.
With mystamp you do not have to think about formats: customers scan a QR code at the counter and add the card to their wallet, and you scan the card with your own phone to give a stamp. No extra scanner or POS system needed.
QR code on the counter, stamp card in the wallet
Your customers scan a QR code and add the mystamp card to Apple or Google Wallet with one tap. You stamp it with your own phone – no scanner, no POS system.
- Free-forever plan
- Ready in 10 minutes
- No app for customers
Pros and cons: 1D vs. 2D
| 1D barcode | 2D code | |
|---|---|---|
| Data capacity | Low | High |
| Error tolerance | Low | High, with error correction |
| Scanner | Laser or camera | Camera only (imager, smartphone) |
| Space needed | Wide, flat | Compact, square |
| Readable from a phone screen | Limited | Good |
What it means for small shops
For most shops, a simple rule of thumb is enough:
- Customers scan with their phone? Use a QR code.
- The code is shown on a phone and you scan it? QR or Aztec, scanned with a smartphone or 2D scanner.
- Your till only reads 1D barcodes? Code 128, or check whether a scanner upgrade is worth it.
Common mistakes: printing QR codes too small, designing codes in brand colours with too little contrast, and printing fixed links into codes that later change. For the last one, a dynamic QR code helps.
Related terms
- QR code: the most widely used 2D code
- PKPASS: the file format for Apple Wallet cards
- NFC: contactless radio transfer as an alternative to barcodes
- Wallet pass: a digital card in Apple or Google Wallet
- Deep link: a link that leads straight to specific content, often behind a QR code
Frequently asked questions
What types of barcodes are there?
Barcodes are either one-dimensional or two-dimensional. 1D codes include EAN-13 and UPC on retail products, Code 128 in logistics and warehousing, and Code 39 in industry. 2D codes include the QR code, Aztec code, PDF417 and Data Matrix. 2D codes hold more data and tolerate damage better, but need a camera-based scanner to read them.
What is a PDF417 barcode?
PDF417 is a stacked 2D barcode made of several rows of short bar patterns. It was developed in the early 1990s and appears, for example, on printed boarding passes and some ID documents. It stores well over a thousand characters and has error correction. It is one of the four formats Apple Wallet supports.
What is an Aztec code?
An Aztec code is a square 2D code with a bullseye of nested squares in the centre, a bit like a pyramid seen from above. It needs no white border, so it scans well even when small or shown on a dim phone screen. That is why many rail operators and airlines use it for mobile tickets.
What is the difference between Code 128 and EAN-13?
EAN-13 is a numbers-only code with exactly 13 digits that identifies retail products worldwide; the numbers are issued by GS1. Code 128 can store letters, digits and symbols of variable length and is mainly used for shipping labels, warehouse locations and customer numbers. Both are one-dimensional barcodes readable by simple laser scanners.
Which barcode is best for a loyalty card?
For digital loyalty cards in Apple or Google Wallet, a QR code is usually the best choice: every phone camera can read it, it is error-tolerant and it holds plenty of data for a customer ID. You only need Code 128 or EAN if an existing POS system can read nothing but 1D barcodes. Aztec is a good alternative when the code is displayed very small.
Can every barcode scanner read QR codes?
No. Classic laser scanners only read one-dimensional barcodes and struggle with phone screens. For QR, Aztec, Data Matrix and codes on smartphones you need a 2D scanner with a camera, known as an imager. Any current smartphone can read these codes too, often straight from the camera app.
Sources & further reading
- PKBarcodeFormat – Apple Developer
- Barcode – Wikipedia
- QR code – Wikipedia
About this guide
Written by the mystamp editorial team in Mannheim, Germany. We build digital stamp cards for local shops, and our guides bring together what actually works day to day in small businesses. We back numbers and legal statements with sources and update the article when things change.
Published: 1 December 2026 · Updated: 1 December 2026 · Spotted a mistake or have a question? Write to us