Skip to main content

QR Codes: How They Work and When to Use Them

10 min read

QR codes have become part of everyday life—on menus, posters, tickets, and product packaging. They let people quickly open a link, view text, or save a contact by scanning with their phone. This article explains how QR codes work, when they are useful, best practices for size and content, common mistakes to avoid, and how you can create them for free with a browser-based tool that keeps your data private.

What Is a QR Code?

QR stands for Quick Response. A QR code is a two-dimensional barcode that stores data in a grid of black and white squares. Unlike a traditional barcode (which holds a short string of numbers), a QR code can store:

  • URLs and web links
  • Plain text
  • Contact details (vCard)
  • Wi-Fi credentials
  • Small amounts of binary data

When you scan the code with a phone camera or a QR app, the device decodes the pattern and performs the action (e.g. open the URL in the browser).

Why QR Codes Caught On

They are fast to scan, work without typing, and can hold more data than a one-dimensional barcode. Once phones had cameras and built-in QR support, they became a standard way to link physical objects (menus, flyers, products) to digital content (websites, forms, downloads). No app install is needed in most cases—the camera app recognises the code and offers to open the link or show the text.

A Brief History

QR codes were invented in 1994 by a Japanese company for tracking automotive parts. The format was made openly available, which encouraged adoption across industries. For years, QR codes were mostly used in manufacturing and logistics. The widespread adoption of smartphones and the addition of built-in QR scanning to camera apps around 2017 to 2018 brought them into mainstream consumer use. The global shift to contactless interactions in recent years accelerated adoption even further, with restaurants, transit systems, and payment platforms all relying on QR codes for everyday transactions.

How QR Codes Work

The pattern of squares encodes the data using a standardised format. Error correction is built in: even if part of the code is dirty or damaged, the rest can often still be read. Larger or more complex data (longer URLs, more text) produce denser codes with more squares. Shorter content produces simpler codes that are easier to scan from a distance.

Data Encoding Process

A QR code encodes data in several steps. First, the input (text, URL, or other data) is converted into a bit stream using one of several encoding modes: numeric, alphanumeric, byte, or kanji. Numeric mode is the most efficient for digits only; alphanumeric mode handles uppercase letters, digits, and a few symbols; byte mode supports the full range of characters. The encoder picks the most efficient mode for the input. Next, error correction codes are added using Reed-Solomon algorithms. Finally, the bit stream is arranged into the grid pattern with position markers (the three large squares in the corners), alignment markers, and timing patterns that help scanners orient and read the code.

Key Points

  • No internet needed to generate. You create the code once; anyone with a camera can scan it later. The code itself is just a visual encoding of the data; the scan happens offline. The user may need internet to open a URL, but generating the QR code does not require it.
  • Read-only. Once printed or displayed, the content does not change unless you replace the code. There are no truly dynamic QR codes in the physical sense—if you need to change the destination, you generate a new code and replace the old one (or use a short URL that redirects, so the same QR code can point to a new page by updating the redirect target).
  • Universal. Any smartphone with a camera can scan a QR code without special software in most cases. That makes them suitable for public use—menus, events, product packaging—where you cannot assume everyone has a particular app.

Error Correction Levels

QR codes support four levels of error correction: Low (recovers about 7% of data), Medium (about 15%), Quartile (about 25%), and High (about 30%). Higher levels allow more of the code to be obscured or damaged and still decode correctly, but the code becomes denser (more squares). For print materials that may get folded, creased, or partially covered, a medium or quartile level is recommended. For screen display where the code stays clean, low or medium is usually sufficient. Some designers use high error correction so they can place a small logo in the centre of the code without breaking scannability—the error correction compensates for the covered area.

Data Capacity

A standard QR code can hold up to about 3,000 alphanumeric characters or around 7,000 numeric digits, depending on the error correction level. In practice, you rarely need anywhere near that much. Most QR codes contain a URL of 50 to 200 characters. Keeping the content short produces a simpler code with fewer squares, which is easier and faster to scan, especially from a distance or in poor lighting. If you need to encode a long URL, consider using a URL shortener first and then generating the QR code from the short link.

When to Use QR Codes

QR codes are useful when you want to bridge the gap between physical and digital without asking people to type a long URL. Common uses include:

  • Menus and flyers: Link to a full menu, event page, or sign-up form. One code on a table tent or poster takes users straight to the content.
  • Business cards: Link to your website, portfolio, or LinkedIn. Saves space and makes it easy for people to find you later.
  • Events: Tickets, check-in, or session feedback. Attendees scan to register or open a form.
  • Products: Link to manuals, registration, or support. One code on the box or label gives access to help and documentation.
  • Payments: Some payment systems use QR codes for instant transfers. The payer scans a merchant code to authorise payment.
  • Education and training: Teachers and trainers use QR codes on handouts to link to additional resources, videos, or quizzes without requiring students to type URLs.
  • Real estate: Property listings with a QR code on the sign allow passersby to view photos, pricing, and contact details on their phone immediately.

Keep the destination URL short and mobile-friendly so the experience after the scan is smooth. Long URLs make the QR pattern denser and harder to scan; use a short link or redirect if needed.

Developer Use Cases

Developers find QR codes useful in several workflows. You can share a local development URL with your phone for mobile testing by generating a code from the local network address. You can link from printed documentation or conference posters to a repository, documentation site, or demo. During presentations, a QR code on a slide lets the audience open a link without you needing to spell it out. For internal tools, a QR code on a physical device can link to its configuration page or dashboard. The key advantage is speed: scanning a code is faster and less error-prone than typing a URL manually, especially on a phone.

Best Practices

  • Size and contrast. Make the code large enough to scan easily (usually at least two to three centimetres per side for print; on screen, a few hundred pixels). Ensure good contrast—black on white or dark on light. Fancy colours or low contrast can reduce scan success. Avoid inverting the colours (white on black) unless you have tested it thoroughly, as some older scanners struggle with inverted codes.
  • Test before printing. Scan the code yourself on a few devices (different phones, lighting conditions) to confirm it works. Fix the content or size if scans fail. Testing on at least two different phone brands is recommended because camera and software differences can affect scanning reliability.
  • Short URLs. Use a short link or UTM parameters so the QR code stays simple and scannable. Dense codes are harder to read from a distance. If you use a URL shortener, make sure the short link service is reliable and will not expire or change.
  • Call to action. Add a short line of text like "Scan for menu" or "Scan to download" so people know what to do. Not everyone recognises a QR code at a glance; a label helps. Place the instruction near the code, not far away where the connection might be lost.
  • Placement matters. Position the QR code where people can comfortably hold their phone at scanning distance. Avoid placing codes on moving objects, at extreme heights, or in areas with poor lighting. The ideal scanning distance is roughly ten times the width of the code, so a three-centimetre code works well at about thirty centimetres.
  • Keep it relevant. Only use a QR code when it adds value. If the audience is already on a device with a browser, a clickable link is more convenient than a code they need to scan. QR codes shine when bridging physical to digital, not when replacing a simple hyperlink on a screen.

Common QR Code Mistakes

  • Encoding a URL that is not mobile-friendly. If the page behind the QR code does not render well on a phone, the user experience after scanning is poor. Always check that the destination is responsive and loads quickly.
  • Printing too small. A code that is too small to scan frustrates users and defeats the purpose. Scale up and test before committing to print.
  • No error correction for physical use. If the code will be printed on materials that may get dirty, folded, or worn, use a higher error correction level so it remains scannable over time.
  • Broken destination links. A QR code that leads to a 404 page or an expired link wastes the user's effort. Monitor the destination URL and update or redirect if the content moves.
  • Overloading with data. Encoding an entire paragraph of text produces a very dense code that is slow to scan. Keep content short—preferably a URL—and put the detailed information on the linked page.

Creating QR Codes for Free

You do not need paid software to create QR codes. A free QR Code Generator lets you enter a URL or any text and get a QR code image instantly. You can download it and use it in posters, websites, or documents. The tool runs in your browser, so the content you enter is not sent to a server. Generate as many codes as you need for different links or campaigns.

Privacy and Browser-Based Generation

When you generate a QR code in your browser, the data you enter (the URL, text, or contact info) stays on your device. It is not uploaded to a server, stored in a database, or logged. This matters when you encode sensitive content, such as internal links, Wi-Fi passwords for an office network, or pre-filled form URLs with personal details. A browser-based tool processes everything locally, so you maintain full control over what you share.

Workflow for Creating and Using QR Codes

  1. Decide what content the code should contain (usually a URL).
  2. Shorten the URL if it is long to keep the code simple.
  3. Open the QR Code Generator and enter the content.
  4. Download the generated image (PNG or SVG depending on the tool).
  5. Test the code by scanning it on at least two different devices.
  6. Place the code in your design along with a clear call to action.
  7. After printing or publishing, periodically check that the destination link still works.

Whether for personal use or small business, QR codes are a simple way to connect print and digital—and creating them does not have to cost a thing. Use our QR Code Generator to create codes locally and keep your URLs and text private.

Related tools