Developer Tools

How to Generate QR Codes That Actually Work — Complete Guide

By Habib ur Rehman · Updated July 2026 · 7 min read

QR codes make it easy to share a website link, contact details, Wi-Fi information, or a short message with a quick scan. However, a QR code can become difficult to scan when it is too small, too dense, low contrast, poorly printed, or heavily covered by a logo.

This guide explains how QR codes work, how error correction affects reliability, how to choose a suitable size and contrast, and what to test before using a QR code on printed or public materials.

How QR Codes Work

A QR code is a two-dimensional barcode that stores information in a grid-like pattern. It can contain a website address, plain text, contact details, Wi-Fi connection information, or other supported data. A phone camera or QR scanner reads the pattern and opens or displays the encoded information.

QR codes include error-correction data. This can help a scanner read a code when part of it is slightly damaged, obscured, or printed imperfectly. The level of error correction affects both the code's tolerance and its visual density, so the final QR code should always be tested in its intended format. DENSO WAVE provides an overview of the QR Code standard.

QR Code Error-Correction Levels

The figures below are approximate recovery guidelines from the QR Code standard. They do not guarantee that a specific percentage of a printed or logo-covered code will scan successfully. The amount of data stored, QR-code version, logo placement, print quality, contrast, and scanner quality can all affect the result.

LevelApproximate recoveryBetter wording for use
L (Low)about 7%Simple, clean codes with little risk of damage
M (Medium)about 15%General-purpose codes
Q (Quartile)about 25%Codes that may face imperfect printing or moderate visual treatment
H (High)about 30%Codes with carefully tested logos or a higher risk of damage

Higher error correction can be useful when a QR code includes a logo or may be printed in conditions where it could be scratched, folded, or partially obscured. However, higher error correction can also make the QR pattern denser. If you add a logo, use a suitable error-correction level offered by the generator and test the final QR code on several devices before publishing or printing it.

QR Code Size and Scanning Distance

A larger QR code is generally easier to scan from farther away, especially when it is printed on a poster, sign, menu, or outdoor display. The required size depends on the amount of data stored, the camera being used, lighting, print quality, contrast, and how far away people will stand.

For small printed materials such as business cards, use a clear code with enough physical space around it and test it at normal hand-held scanning distance. For posters, signs, or displays that people will scan from farther away, use a larger QR code and test it from the expected viewing distance.

Avoid making a QR code unnecessarily small. Before printing a large batch, test a real printed sample with different phones, under normal lighting, at different distances and angles.

Color and Contrast

A dark QR pattern on a light background is usually the most reliable choice. Black on white provides strong contrast and works well across many scanners, screens, and print conditions.

Colored QR codes can work when the foreground remains clearly darker than the background. Avoid low-contrast combinations, gradients that make parts of the code too light, reflective surfaces, and busy backgrounds behind the code.

Inverted QR codes, such as a light pattern on a dark background, may work with some modern scanners but can be less reliable across devices and apps. If you use an inverted or stylized design, test the final version carefully before using it publicly.

Leave a Clear Border Around the QR Code

A QR code needs a blank margin around its outer edge, often called a quiet zone. This clear space helps scanning apps identify where the code begins and ends.

Do not place text, borders, photos, patterns, or design elements directly against the QR code. Keep a visible light-coloured margin around all four sides, and do not crop the code tightly when exporting or placing it in a design.

Adding a Logo to a QR Code

A logo can make a QR code more recognisable, but it also covers part of the pattern that scanners need to read. Keep the logo modest, place it carefully in the centre if the generator supports that layout, and leave enough of the QR pattern visible around it.

Use an appropriate error-correction setting, avoid oversized logos, and preserve the clear border around the outside of the QR code. Generate the final design and test it before printing or publishing it.

Test the QR code with more than one phone or scanning app, under the lighting and at the distance where people will actually use it. If scanning is inconsistent, reduce or remove the logo, increase the physical size, improve contrast, or simplify the encoded content.

What You Can Store in a QR Code

QR codes can store several kinds of information, depending on the generator and the receiving device:

  • Website URLs: Link to a page, product, registration form, or profile.
  • Plain text: Display a short message, instruction, or reference code.
  • Wi-Fi details: Help guests connect to a network. Do not use this for a private network unless you are comfortable sharing its credentials with anyone who can scan the code.
  • Phone numbers: Open a phone app with a number ready to call.
  • Email addresses: Open an email app with the address filled in.
  • Contact details: Share a contact card where supported.

Adding more information usually creates a denser QR code. Dense codes can be harder to scan, particularly when printed small. Keep URLs and text as short as practical, then test the final code.

How to Generate a QR Code

  1. Open the QR Generator
  2. Choose the type of information you want to encode, such as a URL, text, Wi-Fi details, or contact information
  3. Enter the required information carefully
  4. Select the available design, size, and error-correction options
  5. Add a logo only if the tool supports it and you plan to test the final code
  6. Generate and download the QR code
  7. Scan the downloaded QR code before sharing, printing, or publishing it

Review the QR Generator page for its current supported content types, export options, browser requirements, processing details, and privacy information.

Generate Your QR Code Now

Create a QR code, choose your settings, and test it before printing or publishing.

Open QR Generator

Common Questions About QR Codes

What size should a QR code be?

Use a size that is easy to scan in its intended setting. Small QR codes can work on business cards when they are printed clearly with a visible border, while posters and signs usually need larger codes for scanning from a distance. Print or display a sample and test it with different phones before final use.

Can I put a logo in the middle of a QR code?

Yes, if the generator supports it, but a logo can reduce scanning reliability when it covers too much of the pattern. Use a modest logo, keep the code high contrast, choose an appropriate error-correction setting, and test the final QR code before printing or publishing it.

Does QR code color affect scanning?

A dark QR pattern on a light background is usually the most reliable choice. Avoid low-contrast combinations and inverted codes unless tested thoroughly.

Can a QR code expire or stop working?

A standard QR code only stores information such as a URL or text. It does not expire by itself. However, if the QR code contains a URL and that URL stops working, the QR code will lead to a dead page. For permanent use, encode static information or ensure the destination URL remains active.

Do QR codes track who scans them?

A standard QR code only stores information such as a URL or text. It does not track scans by itself. However, a QR code that links to a website or tracking URL may allow the website owner or analytics provider to record visits, depending on how that destination is configured.

Should I test a QR code before printing?

Yes. Test the final exported image or printed sample, not only the preview inside the generator. Check it with multiple phones or scanning apps, in the expected lighting, at the expected distance, and after placing it in the final design.

HR

About the Author
Habib ur Rehman runs Info Bay Tools, a collection of browser-based utilities for common image, PDF, audio, video, text, and web tasks. This guide explains practical QR-code design and testing habits so users can create codes that are easier to scan in real situations. Learn more about Info Bay Tools.

Explore Related Tools