Opens in a new tab

How Do QR Codes Work? The Complete Guide to Static and Dynamic QR Codes

QR codes are everywhere these days—on restaurant menus, product packaging, and even billboards. But have you ever wondered where they came from, why they’re so popular, and how they can be used for e-commerce?

by: Wojciech Filipek
·
·
November 2, 2024
Share
Photo by Steve Johnson on Unsplash
IN THIS ARTICLE

KEY TAKEAWAYS

  • A QR code is a two-dimensional barcode that stores data in a grid of black and white squares. Your phone’s camera reads the pattern, decodes it and acts on it – usually by opening a link.
  • Static QR codes store the destination directly in the pattern. They never expire, but they can’t be changed after printing and can’t be tracked.
  • Dynamic QR codes store a short redirect link. You can change the destination, see scan statistics and route people by device or location – without reprinting.
  • Built-in error correction lets a QR code survive up to 30% damage, which is why codes with logos still scan. Size, contrast and a clear margin matter more than design.
  • QR codes are safe as a technology, but “quishing” (QR phishing) is growing. Businesses should use trusted domains and tell people where a code leads.

QR codes went from a factory tool to something we scan every day: restaurant menus, parcels, boarding passes, payments, packaging, posters and business cards. Yet most people – including many marketers who print them – don’t know how they actually work, why some codes stop working and others last forever, or what “dynamic” means.

This guide explains it in plain language. We build and run Scanteo, a dynamic QR code platform, so we’ll also share what we’ve learned about making QR codes that keep working for years.

What is a QR code?

A QR code (Quick Response code) is a two-dimensional barcode. A traditional barcode stores information in one direction – a row of lines of different widths. A QR code stores it in two directions, in a square grid of small black and white modules. That’s why it can hold far more data: up to 7,089 digits or 4,296 letters and numbers in the largest version, compared with a couple of dozen characters in a classic barcode.

In practice, most QR codes contain a short piece of text that tells the phone what to do: open a website, connect to Wi-Fi, save a contact, send a text message or start a payment.

Who invented the QR code?

The QR code was invented in 1994 by Masahiro Hara and his team at Denso Wave, a Japanese company in the Toyota group. Car factories were tracking parts with barcodes, and workers had to scan several labels per box. Hara’s team designed a code that could hold more information and be read quickly from any angle – hence “Quick Response”.

Traditional shopfront on a street in Japan, where the QR code was invented
Photo by Clay Banks on Unsplash

Denso Wave patented the technology but chose not to enforce the patent, so anyone could use QR codes for free. That decision, plus the standardisation of QR codes as ISO/IEC 18004, is the main reason they spread worldwide. The real breakthrough for consumers came around 2017, when iPhone and Android cameras started reading QR codes natively – no separate app needed. The pandemic did the rest: contactless menus and check-ins made scanning a habit.

How do QR codes work?

When you point your camera at a QR code, three things happen in a fraction of a second:

  1. The phone finds the code. The three large squares in the corners (finder patterns) tell the software where the code is, how big it is and how it’s rotated. That’s why you can scan a code upside down or at an angle.
  2. It reads the grid. Smaller alignment and timing patterns help the software map every module, even on a curved or slightly distorted surface. Each black or white module is a bit of data.
  3. It decodes and acts. The bits are converted back into text – for example https://example.com/menu – and the phone offers to open it.

The anatomy of a QR code

PartWhat it does
Finder patternsThe three big squares in the corners – show position and orientation
Alignment patternA smaller square that corrects distortion on larger codes
Timing patternsLines of alternating modules that define the grid
Format & version infoTell the scanner which error correction level and size are used
Data and error correctionThe actual content, plus extra data used to repair damage
Quiet zoneThe empty margin around the code – scanners need it to separate the code from its surroundings

Error correction: why damaged codes still scan

QR codes use Reed–Solomon error correction – the same family of techniques used on CDs and in satellite communication. Part of the code is reserved for recovery data, so the scanner can rebuild missing pieces. There are four levels:

LevelData that can be restoredTypical use
L (Low)~7%Clean, controlled environments; maximum data
M (Medium)~15%The default for most marketing codes
Q (Quartile)~25%Industrial use, codes that may get dirty
H (High)~30%Codes with a logo in the middle, outdoor and packaging use

Higher error correction makes the code denser (more modules), so it needs to be printed a bit larger. This is also how branded QR codes work: a logo covers part of the pattern, and error correction fills in the gap.

Static vs dynamic QR codes

This is the single most important decision when you create a QR code – and the one most people don’t know they’re making.

A static QR code stores the final content directly in the pattern. If it’s a link, the full URL is encoded in the squares. Static codes are free, work offline (for things like Wi-Fi or contact details) and never expire, because there’s nothing in between. But once printed, they can’t be changed, and you can’t see how many people scanned them.

A dynamic QR code stores a short redirect link that points to a QR platform. When someone scans it, the platform sends them to the current destination. That one extra step gives you a lot of control.

Static QR codeDynamic QR code
What’s encodedThe final content (e.g. full URL)A short redirect link
Change destination after printingNoYes, anytime
Scan analyticsNoYes – scans, time, device, location
Smart routing (by device, country, time)NoYes
Code densityGrows with content lengthSmall and simple – easier to scan
ExpiryNeverDepends on the provider
Best forWi-Fi, vCards, permanent links, one-offsMarketing, packaging, menus, anything printed at scale

When to choose dynamic: whenever the code is printed in volume or will be in circulation for a long time – packaging, menus, flyers, product labels, signage, business cards. A broken link on 10,000 printed boxes is expensive; changing the destination of a dynamic code takes a few seconds.

Do QR codes expire?

The QR code itself never expires – it’s just a pattern. What can stop working is the destination:

  • Static codes work as long as the encoded link works. If the website moves or the page is deleted, the code leads to an error.
  • Dynamic codes work as long as the platform keeps the redirect active. This is the catch many businesses discover too late: some QR generators deactivate codes when a free trial or subscription ends, and printed codes suddenly lead nowhere.

Before you choose a dynamic QR code provider, check what happens to your codes if you downgrade or cancel. We built Scanteo so that printed codes keep working even after a downgrade or cancellation – because a QR code that’s been printed is a promise to every person who will scan it.

QR code size: how big should a QR code be?

A common rule of thumb is a minimum size of about 2 × 2 cm (0.8 × 0.8 in) for codes scanned up close, like business cards or product labels. For larger distances, use the 10:1 rule: the scanning distance should be no more than about ten times the code’s width. A poster read from 2 metres away needs a code of at least 20 cm.

Other factors that matter:

  • Keep the quiet zone. Leave an empty margin of at least four modules around the code.
  • Use strong contrast. Dark code on a light background works best. Inverted (light on dark) codes and low-contrast brand colors fail on some phones.
  • Shorter content = simpler code. Long URLs create dense codes that need more space. Dynamic codes stay simple because they always encode a short link.
  • Test before printing. Scan with several phones, in the real size and on the real material – glossy, curved or textured surfaces change the result.

Are QR codes safe? Understanding quishing

The QR technology itself is safe – a code can’t install anything on its own. The risk is where it leads. “Quishing” (QR code phishing) means using a malicious code to send people to fake login or payment pages. Typical tricks include stickers placed over genuine codes on parking meters and posters, or codes in emails that bypass link scanners.

For people scanning codes:

  • check the address your phone shows before opening it,
  • be suspicious of codes stuck on top of other codes, especially for payments,
  • never enter passwords or card details on a page you reached from an unexpected code.

For businesses creating codes:

  • use your own domain or a well-known provider, so the preview looks trustworthy,
  • tell people what the code does (“Scan to see today’s menu”),
  • monitor where your codes lead – broken or hijacked destinations damage trust,
  • choose a provider that checks destination links and doesn’t inject ads or trackers.

How businesses use QR codes

Gallery wall with six large, colorful designer QR codes
Photo by Maria Ivanova on Unsplash
  • Restaurants and hospitality: menus, ordering, reviews, Wi-Fi access.
  • Retail and ecommerce: product information, reviews, reorders, loyalty programs, gift cards and returns.
  • Packaging: instructions, ingredients, recycling information, warranty registration – updated without reprinting.
  • Marketing: posters, flyers, out-of-home and TV campaigns that connect offline attention to a landing page you can measure.
  • Events: tickets, check-in, agendas and networking.
  • Payments: QR-based payments are standard in many countries and growing elsewhere.
  • Operations: asset tracking, inventory, maintenance logs – the original factory use case.

QR codes in WooCommerce and online stores

For online stores, QR codes connect physical touchpoints back to the shop: a code on the packing slip that leads to a review form, a reorder link on a consumable product, a code on a printed catalogue that opens the product page, or a code on an in-store display that adds a discount to the cart. With dynamic codes you can measure which printed materials actually drive orders – and change the offer mid-campaign.

How to create a QR code that works

  1. Decide: static or dynamic. Anything printed in volume or used for marketing → dynamic.
  2. Pick the destination. Make sure the page is mobile-friendly and fast – people scan on phones.
  3. Design with restraint. Brand colors and a logo are fine if contrast stays high and error correction is set to Q or H.
  4. Add a call to action. “Scan to book a table” works far better than a lonely code.
  5. Size it for the distance and keep the quiet zone.
  6. Test on several devices in final size and material.
  7. Track and adjust. With a dynamic code, check scans and update the destination when your campaign changes.

Why we built Scanteo

We kept seeing the same problems with client projects: codes printed on thousands of items pointing to pages that no longer existed, QR tools switching codes off after a trial, and agencies juggling dozens of logins for their clients. So we built Scanteo – a dynamic QR code platform where a code is printed once and its destination, content and rules can be changed later.

Scanteo includes free QR and barcode generators, dynamic codes with redirects and mobile landing pages, smart routing by country, device or schedule, cookie-free analytics, daily checks of destination links, and client workspaces for agencies. Every design option is tested with independent scanners, so a styled code still scans.

Need dynamic QR codes that keep working? Try Scanteo. Building a product of your own? Scanteo is also an example of the SaaS products we design and build for clients – see our custom software development services.

Frequently asked questions

A QR code stores data in a grid of black and white squares. Your phone’s camera finds the code using the three corner squares, reads the grid, decodes the data – usually a link – and offers to open it. Built-in error correction lets it read codes that are partly damaged or covered by a logo.

A static QR code stores the content directly in the pattern, so it can’t be changed or tracked after printing. A dynamic QR code stores a short redirect link, so you can change the destination anytime, see scan statistics and route people by device, country or time.

The code itself never expires. Static codes work as long as the encoded link works. Dynamic codes work as long as the provider keeps the redirect active – some providers deactivate codes when a trial or subscription ends, so check this before printing.

About 2 × 2 cm (0.8 × 0.8 in) for codes scanned up close. For larger distances, make the code at least one tenth of the scanning distance, keep a clear margin around it and test it at final size.

The technology is safe, but a code can lead to a malicious website. Check the address before opening it, be careful with codes stuck over other codes, and never enter passwords or payment details on a page reached from an unexpected code.

Masahiro Hara and his team at Denso Wave, part of the Toyota group in Japan, invented the QR code in 1994 to track car parts in factories.