QR codes appear on tickets, menus, product labels, signs, and screens. Point a phone camera at one and the device may offer to open a website, join a service, show text, or pass information to an app.
It is easy to think of the pattern as a picture that points to something online. A QR code is more direct than that: the grid itself stores data. A web address can be encoded in the squares, for example, and the scanner reads that address from the image.
That also explains a useful feature that can seem surprising. A QR code may still scan when it is scratched, dirty, or partly obscured. The format includes both visual structures that help a reader locate the grid and redundant information that can recover some unreadable data.
Understanding those two jobs makes QR codes much less mysterious and helps explain why some damaged codes work while apparently clean ones fail.
A QR code is a grid of small modules
The smallest square units in a QR code are called modules. Each module is normally represented as a dark or light square.
Those modules are arranged in a precisely defined grid. Some positions have fixed purposes that help a scanner understand the symbol. Other positions carry the encoded message and information used to recover errors.
The message does not have to be a web address. Depending on how the code is being used, it can represent text or other structured data that an application knows how to interpret.
This distinction matters because a QR code does not inherently “open a website.” If the decoded data is a web address, the phone can recognise it and offer a browser action. If the data follows a format understood by another application, the device may offer a different action instead.
So scanning has two stages: first recover the data from the pattern, then decide what that data means.
The three large corner squares help the scanner find the code
The most recognisable parts of a standard QR code are the three large square patterns near its corners. These are finder patterns.
Their job is not to store the main message. They give scanning software strong reference points for locating the QR code in a camera image and determining its orientation.
That is important because people rarely hold a phone perfectly square to a code. The symbol might be rotated, photographed at an angle, or occupy only a small part of the camera frame. The scanner first has to identify where the code is before it can reliably read the smaller modules.
Other fixed structures help establish the grid and compensate for alignment or perspective. The exact details vary with the QR code’s size, but the practical mental model is simple: part of the pattern tells the reader how to read the rest of the pattern.
A clear blank margin around the outside also matters. This area, called the quiet zone, separates the QR symbol from nearby text, borders, or graphics so a reader can distinguish its boundaries.
The data is converted into a pattern of modules
When software creates a QR code, it does not draw arbitrary black and white squares. It encodes the input according to the QR format, adds information needed for decoding and error recovery, and places the resulting bits into defined positions in the grid.
A longer message generally requires more capacity than a shorter one. The encoder may therefore need a larger grid, depending on the amount and type of data and the selected error-correction level.
This is why two QR codes that both contain web addresses can look very different. The visible pattern depends on the encoded content and the choices made during generation.
It also explains why shortening the information inside a QR code can sometimes make the resulting symbol less dense. There is simply less information to represent, although the exact grid chosen is determined by the encoder and its settings.
A scanner has to turn a camera image back into data
A phone does not read a QR code merely by recognising that it contains lots of little squares. It has to reconstruct the intended module grid from an imperfect image.
The process typically involves finding the symbol, determining its orientation and geometry, estimating which modules are dark or light, and decoding the resulting information according to the QR format.
Real camera images make this harder than the clean digital source suggests. The code can be tilted. The paper can curve. Light can create glare. The camera can be too far away to resolve individual modules clearly. Motion or poor focus can blur neighbouring squares together.
This is why a QR code can fail even when all of its printed squares are technically present. If the scanner cannot obtain a sufficiently clear representation of the grid, there may be nothing useful to decode.
Moving closer, improving focus, reducing glare, or presenting the code at a less extreme angle can therefore help without changing the code itself.
Error correction is why limited damage does not necessarily destroy the message
QR codes include error-correction data: additional information calculated when the code is created so that a decoder can reconstruct some missing or incorrectly read data.
The standard uses Reed-Solomon error correction. You do not need the mathematics to understand its practical effect. Instead of storing only the minimum information needed for the message, the code carries carefully calculated redundancy. If some encoded pieces cannot be read, the remaining information can sometimes be used to recover them.
Imagine a printed ticket whose QR code gets a small crease across it. Several modules may become ambiguous. If the scanner can still locate the symbol and enough of the encoded information remains readable, error correction may allow the original data to be reconstructed exactly.
This is different from guessing what a damaged image probably said. The recovery information is deliberately built into the code when it is generated.
More error correction means a trade-off, not unlimited damage resistance
Standard QR codes provide several error-correction levels. Higher levels devote more capacity to recovery information, which can make a symbol more tolerant of unreadable data. The trade-off is that more of the code’s capacity is being used for redundancy rather than the original message.
For the same payload, increasing error correction can require a denser or larger symbol. At a fixed physical print size, making the grid denser also makes each individual module smaller, which can itself make scanning more demanding.
Most importantly, error correction is not a promise that a particular percentage of the visible square can be covered safely. Recovery is defined in terms of encoded codewords, not simply image area, and the location and type of damage matter.
A code with a small damaged data region may remain readable, while damage that prevents the scanner from locating or aligning the symbol can cause failure before error recovery can even help.
Why logos can appear in the middle of some QR codes
Some QR codes deliberately place a logo or small graphic over part of the grid. This works by accepting that some encoded information will be obscured and relying on sufficient remaining data and error-correction capacity for successful decoding.
That does not make the centre of every QR code a guaranteed safe area. The amount of obscured information, the code’s layout, its error-correction setting, print quality, module size, and scanning conditions all affect whether the result works.
A decorated QR code therefore needs to be tested as the final image that people will actually scan. A design that works as a large image on a monitor may become unreliable after it is reduced, printed, compressed, or placed on a reflective surface.
The same caution applies to changing colours or adding artwork. Styling can be compatible with scanning, but visual appearance should not prevent the reader from distinguishing the modules and structural patterns clearly.
Why an undamaged QR code can still refuse to scan
Physical damage is only one source of failure. A perfectly intact code can be difficult to read when the camera cannot form a clear enough image of its grid.
Common causes include:
- printing the code so small that individual modules are difficult for the camera to resolve;
- viewing it from too far away;
- blur from poor focus or movement;
- glare or reflections that hide parts of the pattern;
- weak contrast between dark and light modules;
- severe perspective distortion;
- placing graphics or text too close to the code and interfering with its quiet zone.
A very dense code can also be more demanding at a given physical size because its modules are smaller. This is one reason a QR code should be evaluated in its real setting rather than only as a clean file on a computer screen.
If a code will be printed, testing the actual printed result is more meaningful than testing only the source image.
A QR code is not necessarily a permanent destination
There is another distinction worth understanding when QR codes are used for links.
A code can contain a destination directly, such as a full web address. In that case, the encoded address is fixed unless the QR code itself is replaced.
Some services instead create a QR code that contains an intermediate web address controlled by the service. That address can redirect visitors somewhere else, allowing the service to change the final destination later without changing the printed pattern.
People sometimes call these arrangements static and dynamic QR codes, but the QR scanning mechanism is not fundamentally different. The scanner still decodes the data stored in the grid. The apparent flexibility comes from what the encoded address does after the browser connects to it.
This is useful when deciding how long a printed code needs to remain useful. The pattern can be physically permanent while the online resource behind an encoded redirect changes.
What to remember when a QR code is hard to scan
Think of successful scanning as a chain. The camera must first capture a usable image. The scanner must locate and align the grid. It must read enough modules to decode the symbol. Error correction can then recover a limited amount of unreadable encoded data. Finally, the phone or application interprets the recovered content.
That mental model suggests practical troubleshooting. If a code will not scan, make the symbol larger in the camera view, allow the camera to focus, reduce reflections, straighten an extreme viewing angle, and make sure the whole code and its surrounding margin are visible. For a code you are creating, test the final size and medium rather than assuming that successful decoding of the original image guarantees successful real-world use.
Conclusion
A QR code is structured data presented as a two-dimensional grid. Its large corner patterns and other fixed features help a scanner find and interpret that grid, while error-correction information can recover some encoded data that is missing or misread.
That redundancy is why limited scratches or obstruction do not necessarily make a QR code useless. But it cannot compensate for every problem: poor focus, tiny modules, glare, missing margins, severe distortion, or damage to important structural features can still prevent a scan.
The useful way to think about QR codes is therefore not as magical images or simple links. They are machine-readable data symbols designed to remain practical under imperfect real-world scanning conditions.