MDXTORA

August 18, 2026 · By Dhurka Manchukan, Software Engineer · Product · 4 min read

Understanding QR code technology

QR codes are everywhere now, on menus, posters, packaging, tickets and business cards, but most people have never wondered how a grid of squares can carry a web address. Understanding the basics helps you make better codes that scan reliably and last.

What a QR code actually is

A QR code is a two-dimensional barcode that encodes data as a grid of black and white modules (the small squares). Unlike a traditional barcode, which is read along one line, a QR code is read across two dimensions, so it can hold much more information: URLs, plain text, contact details, Wi-Fi credentials and more.

The three large squares in the corners are finder patterns. They let a camera quickly work out where the code is, how it is rotated and how large it appears. Smaller alignment patterns and timing patterns help the scanner correct for skew and distortion when the code is on a curved or angled surface.

Error correction: why damaged codes still scan

Built-in error correction means a code can still scan correctly even if part of it is damaged, dirty or covered. The data is stored with redundant information, using an algorithm called Reed-Solomon coding. There are four levels, commonly known as L, M, Q and H, which can recover roughly 7%, 15%, 25% and 30% of the code's data respectively.

Higher error correction makes a code more robust, but it also makes the pattern denser because more redundancy has to fit in. That is why a code with a logo in the middle usually needs a higher level, and why a plain code with a short URL can use a lower one and stay simple to scan.

Static versus dynamic (redirect-based) codes

A static QR code encodes its destination directly. It is free and works forever, but changing the destination means reprinting the code, and there is no way to count scans. A redirect-based code instead points at a short URL that a server resolves. The printed code never changes; only where it points changes.

  • Static: destination is inside the pattern, no tracking, cannot be edited after printing.
  • Redirect-based: shorter, simpler pattern, editable destination, scan analytics possible.
  • Redirect-based codes depend on the service staying online, so choose a provider you trust.

Because a short URL is shorter than a long destination link, the resulting pattern is also less dense, which tends to scan faster and more reliably at small sizes.

What makes a code scan well

  • Contrast: dark modules on a light background. Inverted or low-contrast colours confuse many scanners.
  • Quiet zone: leave a clear margin (at least four modules wide) around the code.
  • Size: large enough for the scanning distance. A common rule of thumb is about one unit of code width for every ten units of distance.
  • Surface: avoid glossy reflections, heavy curves and wrinkled materials.
  • Content length: shorter data means fewer, larger modules and easier scanning.

Choosing what to encode

For most business uses, encode a short URL that leads to a mobile-friendly page. Make sure that page loads quickly on a phone, since that is the very next thing the visitor sees. A great code that leads to a slow or broken page wastes the scan.

Always test a printed code on a few different phones before producing a large batch. Thirty seconds of testing can save a full reprint.

Data types a QR code can carry

A QR code is only a container, and the same pattern format can hold many kinds of content. The scanner app decides what to do with it based on how the text is structured.

  • A web address opens in the browser. This is by far the most common use.
  • A Wi-Fi string (network name, password and security type) lets a phone join a network without typing.
  • A contact card (vCard) offers to save a name, phone number and email address.
  • Plain text simply displays a message, which is handy for short notes or serial numbers.
  • An email, phone or SMS link opens the matching app with the fields already filled in.

Each of these has a different length and therefore a different density. A contact card holds far more characters than a short URL, so its code will look busier and need more printed space to stay reliable.

Written by

Dhurka Manchukan

Software Engineer · Sri Lanka

Dhurka Manchukan is a software engineer based in Sri Lanka and the person behind MDXTORA. Dhurka designs, builds and runs QRinst, Faviqo and Wayvert, and writes the articles in the Journal from what comes up while building them.

About the author →