Skip to main content

Guide complet · 2026

Comment fonctionnent les codes QR ? Scan, décodage et suite du processus

Les codes QR transforment un motif imprimé ou affiché en action numérique grâce au scan de l’appareil photo d’un smartphone.

Comment fonctionnent les codes QR ?

Un code QR stocke des données dans une matrice bidimensionnelle de modules noirs et blancs. L’appareil photo du smartphone repère les motifs d’angle, lit les modules, applique la correction d’erreurs, extrait la charge utile et déclenche une action, telle que l’ouverture d’un site, la connexion au WiFi, l’enregistrement d’un contact ou un paiement.

How do QR codes work step by step?

Scanning follows a scan-to-action pipeline: capture the image, find the code, correct its shape, read modules, recover data, extract the payload, and hand it to the right app. A dynamic code adds a redirect request after local decoding.

A QR code is a Quick Response 2D barcode. The following eight stages describe the consumer-facing decoding process, which is the reverse of encoding.

  1. 1

    Point the camera

    A phone camera or QR reader captures the code in a live image frame.

  2. 2

    Detect finder patterns

    The scanner recognizes the three large corner squares and identifies a possible QR symbol.

  3. 3

    Correct orientation and perspective

    Software compensates for rotation, distance, and a code photographed at an angle.

  4. 4

    Read the module grid

    Each black or white module is interpreted as part of a binary data pattern.

  5. 5

    Apply error correction

    Reed-Solomon redundancy helps recover data from partial damage, dirt, or imperfect capture.

  6. 6

    Extract the payload

    The decoder reconstructs a URL, text string, vCard, WiFi credentials, or another supported payload.

  7. 7

    Trigger the device action

    The operating system offers the appropriate browser, Settings, Contacts, or payment-app action.

  8. 8

    Resolve a dynamic destination

    For a dynamic QR code, a short redirect URL reaches a server that forwards to the current destination and can log the scan.

1

Camera

2

Finder patterns

3

Decode

4

Payload

5

Action

Scan-to-Action Pipeline: camera → finder patterns → modules → decode → payload → action. For dynamic codes, the action reaches a redirect layer before the final destination.

What happens when you scan a QR code?

Your camera captures an image, the operating system or scanner app detects and orients the code, decodes its data, and presents an action prompt. In good lighting with clear contrast, this often feels nearly immediate.

The camera first needs enough contrast to distinguish the dark modules from the light background. Glare, motion blur, shadows, and a code that is too small can slow or prevent detection.

In the background, the scanner searches for the finder-pattern geometry, samples the module grid, and decodes the payload. On screen, you usually see a preview banner before the phone opens a browser, Settings, Contacts, or another handler.

The name Quick Response refers to the format's practical ability to be found and decoded rapidly, not to a guarantee that every web destination loads quickly.

What the camera sees

A perspective-distorted square image with light and dark regions.

What software does

It locates structure, estimates the grid, and reconstructs the encoded payload.

What you see

A contextual prompt that lets you review and continue to the destination.

How does a phone read a QR code?

Built-in camera software searches for the three finder patterns, uses timing and alignment patterns to establish the module grid, and reads black and white modules as data. Error correction helps rebuild the payload when a capture is imperfect.

Most modern smartphones scan QR codes without a dedicated app. Apple's Camera app and Google Lens are widely reliable; a dedicated reader can still help with specialized workflows, saved history, or older devices.

A finder pattern is one of the three large corner squares that lets a scanner orient the symbol. Alignment patterns are smaller reference squares used on larger codes, while timing patterns are alternating modules that keep the scanner aligned to rows and columns.

The quiet zone is the blank margin around the QR code. It separates the symbol from nearby text or artwork, so cropping it can make finder-pattern detection unreliable.

Module

An individual black or white square in the QR matrix; together, modules represent the encoded data.

Finder pattern

A corner marker that helps the camera locate and orient the code.

Quiet zone

The clear border around the symbol that helps a scanner distinguish it from its surroundings.

How is data stored in a QR code?

Data is stored as a bit sequence mapped onto black and white modules in a square matrix. The decoded payload can be a URL, text, vCard contact, WiFi credentials, or another standardized format.

A QR code stores more information than a one-dimensional barcode because it uses a two-dimensional matrix. Capacity depends on the symbol size, payload content, and error-correction setting.

A restaurant menu commonly carries a URL; a business card can carry a vCard; and a hotel WiFi code can carry a network string. See types of QR codes for payload-selection guidance and how QR codes are generated for the forward encoding process.

How does QR code decoding work?

Decoding reverses generation: the scanner reads symbol metadata and modules, uses Reed-Solomon error correction to recover codewords, and outputs the payload. Generating encodes data into a matrix; scanning decodes it back out.

A decoder reads format and version information before interpreting the data region. ISO/IEC 18004 defines the QR format; scanners use its structural rules instead of treating the image as an arbitrary visual pattern.

Reed-Solomon is the error-correction method that adds recoverable redundancy. It is why a scratched code can still scan, although recovery depends on the correction level and where the damage occurs. Read about QR code error correction for level details.

Decode-side mechanics should not be confused with generation. Generation moves forward from payload to symbol; decoding moves backward from modules to payload.

How do static QR codes work?

A static QR code contains its final payload directly in the symbol: scan, decode, and act. Because there is no redirect layer, changing the destination requires a new QR code and a new print or display.

Static QR codes suit fixed information such as permanent WiFi credentials, a vCard, plain text, or a long-lived PDF URL. The device acts on the decoded payload immediately.

Their simplicity is a strength when the payload is truly permanent. They cannot replace a printed code's destination after the code has been distributed.

How do QR codes work on iPhone and Android?

On iPhone, the Camera app typically displays a notification for a recognized QR code. On Android, the Camera app or Google Lens commonly shows a prompt; exact behavior varies by manufacturer and operating-system version.

On iPhone, aim the Camera app at the code and tap the notification banner. iOS also offers QR-related shortcuts and photo recognition features on supported versions.

On Android, point the Camera app or Google Lens at the code and tap the prompt. Test on your own devices because camera interfaces and permissions differ across manufacturers.

Camera permission is required for live scanning. A reader app is useful when a device's default camera does not expose QR detection or when a workflow needs additional controls.

Do QR codes need internet to work?

Decoding is local: a phone can read the pattern without internet. The action may need connectivity, such as opening a URL or resolving a dynamic redirect; plain text, vCard, and WiFi payloads can still be decoded offline.

This is the Decode vs Destination rule: decoding is always local, while the payload's destination may require a network. A menu URL can decode in a basement even if its web page cannot load there.

A dynamic QR code needs connectivity after decoding because the device must reach its redirect layer. Joining a local WiFi network may not need internet itself, though the network can provide it afterward.

How does QR code scanning differ from barcode scanning?

QR codes are 2D barcodes made from a matrix of modules, while traditional barcodes use one-dimensional lines. The QR layout supports more data and can be read from different orientations when the full structure is visible.

Both formats rely on optical contrast and a scanner that understands the symbol. Read the full QR code vs barcode comparison for format and use-case detail.

Are QR codes safe to scan?

QR codes are not inherently malicious; the risk comes from an unknown or deceptive destination. Preview the action when possible, scan trusted codes, and treat unexpected payment or login prompts carefully.

A QR image does not reveal its destination at a glance, so a sensible check is to inspect the domain before sharing information. Read QR code security for phishing, verification, and organizational guidance.

How do dynamic QR codes work?

A static QR symbol contains its final payload, while a dynamic QR symbol contains a short redirect URL. After local decode, that redirect server forwards to the current destination and can record scan analytics; the printed pattern stays unchanged.

The dynamic entity chain is symbol → redirect layer → editable URL → scan analytics. Analytics attach after the redirect request, not during local decoding. Static codes remain a practical choice for fixed payloads; learn more about static vs dynamic QR codes, scan analytics, and available pricing.

StageStatic QR codeDynamic QR code
What is in the symbol?Final payload, such as a URL or vCard.A short redirect URL.
After decodeThe device opens the payload directly.The device reaches the redirect server first.
Destination changeA new QR code is required.Update the redirect target; the same printed code works.
Scan analyticsNo redirect-layer record is created.A redirect layer can log the scan.
Best fitPermanent WiFi, vCards, and fixed information.Campaigns, menus, events, and trackable links.

Comparison methodology: this table describes the mechanics after a successful scan, not a feature or pricing comparison. Verify provider capabilities before purchasing.

Real-world use cases: how QR codes work in practice

The same decode process leads to different actions depending on the payload. A URL opens a web page, a vCard suggests saving a contact, a WiFi string opens network settings, and a payment link hands off to a payment app.

Restaurant menu

A guest scans a printed code, decodes a menu URL, and opens a mobile-friendly menu page.

Event check-in

A code leads to registration details or ticket validation after the scanner extracts its URL or identifier.

Product packaging

A package code can open instructions, warranty information, or a current promotion.

Business card

A vCard payload decodes into contact data that the phone can offer to save.

Hotel WiFi

A WiFi payload passes network details to the phone so the guest does not type a password.

Payment

A payment payload opens the relevant app or checkout flow; settlement happens separately inside that service.

Explore QR code examples

Try it yourself: create and test a QR code

The clearest way to understand the scan-to-action pipeline is to create a code, scan it with your own phone, and verify the destination before deployment. Test the final printed or displayed asset, not only the source file.

Create a test code

Use a short URL, text, or WiFi payload and preserve a clear quiet zone.

Scan on two platforms

Test with iPhone Camera and Android Camera or Google Lens where available.

Verify the action

Confirm that the expected page, settings screen, contact card, or redirect opens correctly.

At QR-Build, we validate output with cross-device scan tests on iPhone and Android across common 25–50 mm print sizes and on-screen displays before deployment. Lighting, contrast, and device behavior still deserve a final test in the real environment.

Create and test a QR code free

Generate a static or dynamic code, scan it on your phone, and confirm the destination before printing.

Create a free QR code

What causes common QR scanning problems?

Most failures are production problems rather than decoding problems: insufficient size or contrast, a cropped quiet zone, glare, damage beyond error-correction capacity, or a destination that is not ready for mobile visitors.

Code is too small or low contrast

Tiny modules or similar foreground and background colors prevent reliable detection.

Quiet zone is cropped

Keep the blank margin outside all four edges; do not let borders or copy crowd finder patterns.

Damage exceeds recovery capacity

Wrinkles, dirt, or a logo can cover too many modules for the selected correction level.

Glare or motion blur

Change the angle, improve lighting, or hold the camera still so module edges remain clear.

Destination is not mobile friendly

A successful scan can still disappoint if the page is slow, broken, or difficult to use on a phone.

A changed static URL

A static code cannot be retargeted; use a dynamic code when a campaign destination will change.

What are the best practices for reliable QR scanning?

Reliable QR scanning depends on high contrast, adequate physical size, an intact quiet zone, a mobile-friendly destination, and testing on iPhone and Android. Use a dynamic QR code when a destination or campaign will change after printing.

Use high contrast

Dark modules on a light background remain the most dependable visual treatment.

Match size to scan distance

Choose a practical print size for the expected distance; use the QR code size guide.

Preserve the quiet zone

Keep the required blank margin clear in print, signage, and digital layouts.

Test real devices

Check iPhone and Android behavior before producing a large print run.

Write a nearby call to action

A prompt such as “Scan to view menu” explains why someone should scan.

Choose dynamic when change is expected

Dynamic redirects make evolving menus and campaigns easier to manage after printing.

When do QR codes work best for business?

QR codes work best when they are easy to see, easy to scan, and connected to a useful mobile action. Choose static for permanent payloads and dynamic for changing destinations or redirect-layer reporting.
SituationRecommendationWhy
URL may change after printDynamic QR codeThe redirect layer can update the destination while the printed symbol remains the same.
Permanent guest WiFiStatic WiFi QR codeThe payload is fixed and can decode without a redirect server.
Marketing campaign with ROI trackingDynamic QR with analyticsScans can be logged at the redirect layer.
Business-card contactStatic vCard QR codeThe decoded contact can be offered for immediate saving.
Large outdoor printSize and error-correction testingDistance and wear make module clarity and recovery more important.
First deploymentTest iPhone and AndroidCross-device checks expose contrast, size, and destination issues early.

QR code mechanics glossary

These terms describe one connected system: scan → finder patterns → modules → decode → payload → action. Dynamic QR codes continue with symbol → redirect layer → editable URL → scan analytics.

QR code

A Quick Response code: a two-dimensional barcode that smartphone cameras can scan.

Module

An individual black or white square in the QR matrix.

Finder pattern

One of three corner squares that helps scanners locate and orient the code.

Alignment pattern

A smaller reference pattern that helps correct perspective on larger QR codes.

Timing pattern

Alternating modules that synchronize the scanner to the row and column grid.

Quiet zone

The blank margin around a QR code required for reliable detection.

Payload

The decoded data, such as a URL, text string, vCard, or WiFi credentials.

Decode

The process of reading modules and recovering the payload from a QR symbol.

Error correction

Redundant data that helps scanners recover a payload from partial damage.

Static QR code

A QR code with a fixed payload baked directly into its symbol.

Dynamic QR code

A QR code that encodes a redirect URL with an editable destination behind it.

Redirect layer

A server-side URL that resolves to the current destination and can record scans.

Frequently asked questions

How do QR codes work?

A QR code stores data in black and white modules. A scanner detects finder patterns, reads modules, applies error correction, extracts the payload, and performs the linked action.

What happens when you scan a QR code?

Your camera captures the image, the scanner locates and orients the code, decodes the data, and shows an action prompt for a browser, Settings, Contacts, or a payment app.

How does a phone read a QR code?

Built-in camera software detects the three finder patterns, corrects for angle and distance, reads modules as bits, and reconstructs the payload with error correction.

How do QR codes work step by step?

Point the camera, capture the image, detect finder patterns, correct orientation, read modules, apply error correction, extract the payload, and trigger the action. Dynamic codes then resolve a redirect URL.

How do QR codes work without internet?

Decoding happens locally without internet. Opening a URL or resolving a dynamic redirect usually needs connectivity, while text, vCard, and WiFi payloads can be decoded offline.

How do dynamic QR codes work?

A dynamic QR code encodes a short redirect URL. The redirect server forwards to the current destination and can log scan analytics, so the destination can change without reprinting.

How do static QR codes work?

A static QR code contains the final payload directly in the symbol. It has no redirect layer, so changing its destination requires a new code.

How do QR codes work on iPhone?

Open the Camera app, point it at the QR code, and tap the notification banner that appears with the decoded action. Interface details vary by iOS version.

How do QR codes work on Android?

Most Android phones use the Camera app or Google Lens. Point at the code and tap the prompt; the exact interface varies by manufacturer and Android version.

How is data stored in a QR code?

Data is encoded as bits mapped onto black and white modules in a square matrix. Payloads can include URLs, text, contacts, WiFi credentials, and more; see types of QR codes.

Why do QR codes still scan when damaged?

Reed-Solomon error correction adds redundant data that can help recover a payload when some modules are scratched or dirty. The result depends on the correction level and damage pattern.

What is the difference between scanning and generating a QR code?

Generating encodes data into a symbol; scanning decodes the symbol back into data. Read how QR codes are generated for the forward process.

Can QR codes be dangerous?

QR codes themselves are not malicious, but they can point to phishing sites or unwanted actions. Scan trusted sources and preview destinations when possible; see QR code security.

How do QR codes work on a menu or for payments?

A menu QR usually opens a mobile web page. A payment QR opens a payment app or checkout flow; the transaction happens inside that service after decoding.

Related QR code guides

QR Code - QR-Build

Créer un code QR gratuit

Tester le scan en quelques secondes