QR Code vs. Barcode: What's the Difference?
Barcodes and QR codes both turn information into a pattern that a machine can read in a fraction of a second. They often appear side by side on the same package, yet they work differently and are good at different jobs. Knowing the difference helps you understand what your phone is actually reading, why some scans fail, and what you can do with each kind of code.
How a traditional barcode stores information
A classic barcode is a one-dimensional (1D) code. It is a row of black bars and white spaces of different widths. A scanner reads it in a single line from one side to the other, and the pattern of widths translates into a short string of numbers or characters. The height of the bars does not carry extra data; it just makes the code easier to hit with a scanner.
Because the information runs in only one direction, a 1D barcode holds very little: usually a product number or an ID of a few dozen characters at most. That is by design. The barcode is a key, and the details (price, name, stock level) live in a database the store's system looks up.
Common barcode types
- UPC-A: the 12-digit code on most retail products sold in the United States and Canada. It identifies the manufacturer and the specific product.
- EAN-13: the 13-digit international version used in much of the world. Many books carry an EAN-13 that encodes their ISBN.
- Code 128: a compact, flexible format that can store letters, numbers and symbols. You will see it on shipping labels, warehouse tags and many tracking numbers.
- Code 39: an older format still used on ID badges, inventory labels and some industrial equipment.
How a QR code stores information
A QR code is a two-dimensional (2D) code. Instead of a single row, it uses a grid of small squares called modules, and data is stored both across and down. That lets it hold far more information than a 1D barcode: a full web address, a block of text, a contact card or Wi-Fi login details.
The three large squares in the corners are finder patterns. They tell the scanner where the code is and which way it is rotated, which is why you can scan a QR code upside down or at an angle. QR codes also include error correction, meaning part of the code repeats information in a mathematical way. Depending on the level chosen when the code was created, a QR code can still be read even if a portion of it is dirty, scratched or covered by a small logo.
Other 2D codes
- Data Matrix: a square or rectangular grid with a solid L-shaped border on two sides. It can be printed very small, so it is popular on electronic components, medicine packaging and some shipping labels.
- PDF417: a stacked, rectangular code found on many US driver's licenses and boarding passes.
- Aztec: recognizable by a bullseye in the center, often used on airline and train tickets.
What you can do with each
Barcodes
- Product lookup: scan a UPC or EAN to see what the product is, and with some apps, search for prices or reviews online.
- Book lookup: the barcode on the back cover usually leads to the ISBN, which identifies the exact edition.
- Package tracking: some shipping labels use Code 128 for tracking numbers you can copy instead of typing.
Keep in mind that a product barcode by itself only contains a number. Any extra information you see after scanning comes from a search or database, so results can vary.
QR codes
- Websites: menus, product manuals, event pages and forms.
- Wi-Fi credentials: a code can store a network name, security type and password so guests can join without typing. On many Android phones you can create one by going to Settings > Network & internet (or Connections) > Wi-Fi, tapping your network and choosing Share.
- Contact cards: a vCard QR code can add a name, phone number and email to your contacts in one step.
- Payments: many payment and banking apps use QR codes to send or request money. Always confirm the recipient and amount before approving.
- Calendar events, text messages and phone calls: a code can pre-fill an event, a text or a number to dial. Your phone should still ask you before taking action.
Tips for a successful scan
When a scan fails, the problem is usually the conditions, not the code. Try these adjustments in order.
- Improve the light. Scanners need contrast between dark and light parts. Move toward a window or lamp, or turn on your phone's flashlight from the scanner screen or Quick Settings. If the code is glossy, tilt the phone slightly to get rid of glare.
- Adjust the distance. Too close and the camera cannot focus; too far and the modules blur together. Start about 6 to 10 inches away for a typical code and move slowly closer or farther. For large posters, step back.
- Let the camera focus. Hold still for a second or tap the code on the screen to focus. Wipe the camera lens with a soft cloth, since fingerprints are a frequent cause of blurry scans.
- Fill the frame but keep the margins. Codes need a little blank space around them (called the quiet zone). Do not crop the edges out of view.
- Straighten the angle. 1D barcodes in particular read best when the scan line crosses all the bars. Hold the phone parallel to the code and line it up horizontally.
- Try a screenshot. If the code is on another screen, take a photo or screenshot and open it with Google Lens or a scanner app that can read images.
Damaged or poorly printed codes
QR codes tolerate some damage thanks to error correction, but if one of the three corner squares is missing or heavily smudged, the scanner may not find the code at all. Barcodes are less forgiving: a scratch running across the bars can break the read. For product barcodes, the human-readable digits printed below the bars are a reliable backup, since you can type them into a search. Screens set to very low brightness or dark mode can also cause trouble, so turn the brightness up when scanning a code displayed on a phone or monitor.
Which one is "better"?
Neither. Barcodes are simple, cheap and fast at a checkout counter, which is why retail still depends on them. QR codes carry more data, survive more damage and work well with phone cameras, which makes them ideal for links and everyday sharing. Most scanner apps, including our QR & Barcode Scanner Launcher, read both, so you rarely need to know in advance which type you are looking at.