How a Phone Camera Turns a Printed QR Code Into a Link
To scan a printed QR code on an iPhone, the person holding it opens Camera in Photo mode and brings the square into view. In Apple's iPhone User Guide, a link appears at the bottom of the screen while Camera is still showing the paper. When the pattern encodes a web address, that link leads to the address Camera has read from the square. A tap opens the destination.
The big nested marks near the corners give the reader in the phone a way to pick the code out of everything else in the frame and work out which way it is turned. Those marks began with a machinery problem: a team working on barcode readers needed its scanners to find a small patch of print among the other marks on a page or a carton.

Why did the designers study fliers, magazines, and boxes?
Denso Wave's account of the QR Code's development starts on the manufacturing floor. Factories needed to carry more information in print, and some used several barcodes together to hold it. The result was more scans for a worker to make. In Denso Wave's development story, Masahiro Hara, the engineer who led the QR Code team, describes the goal he set: "We will develop a compact code that can store more information, including kanji and kana characters, and at the same time can be read at higher speed."
A conventional barcode arranges its information across a row of bars. A square grid gives the designer room to encode information along its height as well as its width, but it asks the reader to locate that grid in the first place. Denso Wave describes finding a two-dimensional code as a harder problem for its scanners than finding a conventional barcode. Improving that part of the job meant giving the reader a pattern it could recognize before trying to make sense of the smaller squares.
Hara's team made the surroundings part of the investigation. In Denso Wave's history, the developers took pictures and symbols from fliers, magazines, and cardboard boxes, reduced them to black and white, and looked at the relative widths of the light and dark areas. A mark that looked distinctive on a drawing board could still look like something else when it landed beside an illustration on a carton. The question in the survey was how often the same proportions already turned up in the kinds of print the reader might encounter.

The search turned up a ratio Denso Wave says the team saw least often in the printed material it examined. They built it into the thickness of the bands in a square target. On the finished code the target is called a finder pattern, a mark with the same proportions from one code to the next even as the little squares around it change with the information being carried.
How do the corners tell the reader which way the code is turned?
A line across the middle of a finder pattern passes through a black outer rim, a white band, a black center, another white band, and the far side of the black rim. The widths Denso Wave gives, 1:1:3:1:1, make the black center three times as wide as either adjacent white band and put a rim of that same narrow width on the outside. The sequence gives the reader something specific to look for in a field of dark and light marks.
| Band in reading order | Relative width |
|---|---|
| Black rim, near side | 1 module |
| White band, near side | 1 module |
| Black center | 3 modules |
| White band, far side | 1 module |
| Black rim, far side | 1 module |
The widths describe a proportion, so the same pattern works at more than one printed size. A module is the small square that makes up the grid. Where a line crosses the center square, the scanner sees a continuous stretch of black equivalent to several of those little squares side by side. The runs of light and dark give the reader a local sense of scale even before it has traced the whole symbol. In a larger copy all the bands widen together.
Denso Wave placed the finder pattern at three corners of the QR code. The centers of those marks form an L that turns with the paper, with one arm running parallel to the printed rows and the other parallel to the columns. The corner diagonally opposite the elbow has no finder of its own, so a quarter turn changes which corner of the image lacks a large square. The same proportions identify the marks; their positions relative to one another give the orientation.
This geometry answers a question the eye can usually settle at a glance. A person can turn a printed sheet and still see where its rows run, especially when there are lines of type nearby. A reader built for QR codes has the landmarks on the symbol itself. They travel with the print and can serve the same purpose on a sheet held by hand or on the face of a carton moving past a scanner.
How does the phone get a web address from the grid?
Once a reader has located the symbol, it can read the dark and light modules at positions in the grid. Project Nayuki's technical description of the format traces the same job in reverse, showing how a string of characters such as a web address is turned into the squares in the first place. The characters are encoded as bits, values that can be represented using the two states of a module. The format gives the reader an order for putting the data back together. The placement path starts at the lower right of the code in its usual orientation, zigzags up and down through strips of columns, and skips spaces reserved for finder marks and other fixed patterns. The print carries the characters of the address in that arrangement.
Before the grid goes to print, the encoder adjusts the pattern it will present to the camera. In Project Nayuki's worked example, the encoder applies a mask, a rule that flips selected squares from light to dark or dark to light. The encoder scores possible masks partly by looking for long stretches of the same color and for patterns likely to be mistaken for a finder. The mask acts on squares in the data area and leaves the finder marks in place. The chosen rule is recorded in the code near the finder marks, where a reader can recover it and undo the flips as it reassembles the message.
The reserved space serves different jobs at different scales. A finder mark spans several modules so that it stands out from the data. The smaller alternating marks called timing patterns run horizontally and vertically and give the grid a regular reference. Around the whole square is a clear border called the quiet zone. Denso Wave's printing guide calls for a margin four modules wide on each side. The blank strip is measured using the squares of the code itself, so it grows with them in a larger print and keeps nearby ink away from the edge of the symbol.
- Quiet zone: Clear space separates the symbol from surrounding print.
- Finder patterns: The large targets mark the corners and orient the grid.
- Timing patterns: Alternating light and dark modules give the reader a regular reference.
- Data area: The smaller squares carry the message and extra information for recovering damaged data.
Denso Wave also builds room for a kind of reading error familiar from looking at a well-used carton: some of the print can be dirty or damaged. The format adds error correction data made from the original message. A reader can use that extra information to recover some data it reads incorrectly. The limit is about how much encoded data has to be recovered; Denso Wave expresses it in units of encoded data called codewords. A blemish can also interfere with the search for the grid itself if it obscures the shapes the reader relies on to locate it.
Size on paper can also be misleading. Denso Wave's table starts at 21 by 21 modules and goes up to 177 by 177 modules for the conventional square format. A grid toward the dense end of that range, printed at the same width as a simple one, packs many more changes from light to dark into the same space. The phone sees those changes through its lens, so the separation between tiny adjacent marks can matter as much as the outline of the square. A square that still looks conspicuous on the page can contain detail that is difficult to resolve in the camera view.
Denso Wave's print guide makes the scale concrete with a worked example for 50 alphanumeric characters. In that layout, the printed grid itself is 7.366 millimeters wide, while the space it needs with the quiet zone is 9.398 millimeters, according to the guide. That puts the whole layout inside a square just under a centimeter wide. A crop that preserves every dark square could still cut into the blank space the guide counts as part of the print area.
Those dimensions come from a particular printing setup. Denso Wave works the example at 400 dots per inch, with each module four printer dots wide. The module is the smallest square the reader has to distinguish, but the printer can build that square from several smaller dots. Increasing the width of a module increases both the width of the grid and the margin it needs.
What appears in the iPhone camera view before the page opens?
Apple's iPhone User Guide describes the result in Photo mode as a link at the bottom of the screen. The mode is familiar from ordinary picture taking: in Apple's camera guide, a tap on the shutter takes a photo, while in its QR instructions, the reader places the printed code inside the frame and taps the link that appears. The same live preview supplies the view of the paper. With a QR code in it, the preview also shows the result of interpreting the pattern.
| Task | What the person taps | What the tap does |
|---|---|---|
| Taking an ordinary photo | Shutter button | Captures a photo |
| Opening a QR link | Link in the live camera view | Opens the linked content |
When the paper is in view but no link has appeared, the corner marks may be cut off, or the little squares may be too small in the preview to distinguish. Keeping the whole print in frame gives Camera the corner marks and the clear border around them. Moving closer can make the little squares easier for the camera to distinguish, provided the whole symbol still fits in the frame. In Apple's example, opening the page takes a tap on the link at the bottom of the screen.
Frequently Asked Questions
Can an iPhone scan a QR code without downloading a separate app?
Apple's built-in Camera handles QR codes and is available from the Lock Screen as well as the Home Screen. Apple's support guide lists apps and tickets among the kinds of content that QR codes can lead to.
Where is Apple's dedicated Code Scanner?
Apple puts the dedicated scanner in Control Center under Scan Code. If the control is absent, Apple's support guide describes adding it from the Control Center gallery by holding the background and opening Add a Control. The iPhone User Guide also describes a flashlight button in this scanning view for adding light.
What does QR stand for?
QR stands for Quick Response, the name Denso Wave chose to express its goal of fast reading. Denso Wave traces the code's widespread public use in Japan to 2002, when mobile phones with built-in QR readers let people use the printed patterns to reach websites.
When did Denso Wave announce the QR Code?
Denso Wave says it announced the QR Code in 1994, when it was a division of Denso Corporation. The company's history records an early use in the auto industry's electronic kanban, a system for communicating about work in production. The codes were used in tasks that ran from production through shipping.
Sources
- Apple: Scan a QR code with your iPhone or iPad
- Apple: Scan a QR code with your iPhone camera
- Apple: iPhone camera basics
- Denso Wave: QR Code development story
- Denso Wave: History of QR Code
- Denso Wave: Point for determining the code area
- Denso Wave: Information capacity and versions of the QR Code
- Denso Wave: Error Correction Feature
- Project Nayuki: QR Code generator library
- Project Nayuki: Creating a QR Code step by step