QR Code Generator
Enter a URL or text and download a QR code image with size and error correction options.
Encode a URL or a block of text into a QR symbol and control the three parameters that decide whether it actually scans: error correction level, pixel size, and colour. Codes that fail in the field almost never fail because of the data — they fail because the symbol was printed too small for the reading distance, cropped into its margin, or styled until the contrast collapsed. This page covers the encoding and physical constraints behind those failures.
The recovery budget you spend on error correction
ISO/IEC 18004 defines four error correction levels, and the letters map to how much of the symbol can be destroyed and still recovered: L restores roughly 7% of the codewords, M around 15%, Q around 25%, and H around 30%. Reed-Solomon blocks do the work, which is why a code with a coffee ring through it often still reads.
That resilience is paid for in capacity, and the price is steep. At version 40, the largest symbol, byte mode holds 2,953 bytes at level L but only 1,273 at level H — less than half the payload in exactly the same number of modules. Every codeword reserved for recovery is a codeword unavailable for your data, so raising the level on a long payload forces a larger, denser symbol.
This is also why a centred logo overlay is paired with level H. A logo does not degrade the symbol gracefully; it deletes whatever modules sit underneath it, and those have to be reconstructed from the recovery budget. Treat that budget as shared: it also has to absorb creases, glare, ink spread, and a thumb across the corner. Filling most of it with a logo leaves nothing for the real world. For a code that will only ever be displayed on a screen and scanned once, M is a sensible default; for stickers, packaging, and anything handled, start at Q.
Uppercase URLs encode into a denser mode
The encoder picks a mode per segment, and the modes have very different efficiency. Numeric mode packs three digits into 10 bits. Alphanumeric mode packs two characters into 11 bits, or 5.5 bits each. Byte mode spends a full 8 bits per character. Alphanumeric is therefore about 31% cheaper per character than byte mode for the same text.
The catch is that alphanumeric mode covers exactly 45 characters: the digits 0–9, the uppercase letters A–Z, space, and the punctuation $ % * + - . / :. One lowercase letter anywhere in the string, or a single ?, =, &, _, or ~, drops that segment into byte mode. So HTTPS://EXAMPLE.COM/SPRING encodes in alphanumeric mode while https://example.com/spring does not, and the uppercase version needs meaningfully fewer bits.
Before you uppercase everything, know which parts are safe. RFC 3986 makes the scheme and host case-insensitive, so HTTPS://EXAMPLE.COM resolves identically. The path, query string, and fragment are case-sensitive and uppercasing them will break the link on most servers. And because ? and = are outside the alphanumeric set entirely, any URL carrying tracking parameters ends up in byte mode no matter what case you use.
Version, density, and why long URLs scan worse
A QR symbol comes in 40 sizes, called versions. Version 1 is a 21 × 21 grid of modules; each subsequent version adds four modules per side, so version N measures 17 + 4N, and version 40 is 177 × 177. The encoder picks the smallest version that fits your data at your chosen error correction level.
Density is the consequence people miss. Printed at a fixed physical width, a version 10 symbol has modules roughly twice the width of a version 25 symbol. Adding 200 characters to a payload does not just make the pattern look busier — it shrinks every individual module, and once a module falls below what the scanning camera can resolve at the reading distance, the code stops working. A short payload is not a cosmetic preference; it is the single cheapest way to make a code scan reliably.
A QR code is also static. The bytes are fixed the moment it is generated, and a printed one cannot be repointed. The standard answer is to encode a short redirect URL on a domain you control, so the destination can be changed later without a reprint. Shorten first, then encode — shortening after the fact gains nothing, because the version was already chosen. If you go that route, confirm the hops actually resolve with the redirect checker before the code goes to print.
Sizing a printed code for its scanning distance
The working rule in barcode practice is a 10:1 distance-to-width ratio: the symbol should be at least one tenth as wide as the distance it will be read from. A code on a business card held at 30 cm wants about 3 cm of width. A code on a wall poster read from 5 m wants about 50 cm. A code on a shop window meant to be scanned from the pavement is almost always printed several times too small.
Higher versions push that minimum up, because the ratio is really about module size rather than symbol size. If the payload forces a denser version, either shorten the data or enlarge the print — those are the only two levers. Poor lighting, motion, an older phone camera, and any lamination or gloss that produces glare all eat into the same margin, so treat the 10:1 figure as a floor rather than a target.
On screens the failure mode is resampling. Generate the PNG at the size you intend to display or print it, rather than exporting small and scaling up. A 256-pixel image printed 5 cm wide lands around 130 dpi, which visibly softens the module edges and blurs the boundaries the decoder is trying to threshold. Nudging the size slider up costs nothing and removes the problem entirely.
Contrast, inversion, and the margin designers crop
The quiet zone is part of the symbol, not decoration around it. ISO/IEC 18004 specifies four modules of clear space on all four sides for QR Code (Micro QR needs two), and the decoder relies on it to find the symbol boundary. Cropping tight to the outer pattern, or dropping a code onto a busy photograph with no clear margin, breaks it while leaving something that still looks like a working QR code. Keep the white border the generator produces, and add more in your layout if the surrounding artwork is dark or textured.
Orientation matters too. Dark modules on a light background is the convention every decoder is built around; support for reflectance-reversed symbols — light modules on a dark background — is optional in the standard and inconsistent in practice. An inverted code that scans fine on your phone can fail outright on a colleague's device or on a fixed retail scanner, and you will not find out until it is printed.
Symbol contrast is a graded print-quality parameter under ISO/IEC 15415, and it is the parameter styled codes fail. Mid-tone foreground on a mid-tone background is the usual culprit; brand colours picked for a screen palette frequently do not have the separation a camera needs. Gradients are the sneaky version, because the code reads correctly across the dark end of the gradient and fails across the light end — and the three finder patterns in the corners are exactly the region you cannot afford to weaken. Test the finished artwork on an inexpensive Android handset and, if it is going to retail, a fixed scanner, not just the newest phone in the office.
Related tools
Try these tools that work well with this one
Cron Expression Generator
Convert natural language schedules to cron expressions
Lorem Ipsum Generator
Generate placeholder text for design mockups
Password Generator
Generate secure passwords with customizable options
UUID Generator
Generate UUIDs (v1, v4, v7)
DNS & WHOIS Lookup
Query DNS records and fetch WHOIS registry data
Text Case Converter
Convert text between different naming conventions
Related guides
Tutorials and guides to get more from this tool
How QR Codes Work: Error Correction and Data Density
QR codes are everywhere, but how do they store data? Learn about the matrix structure and error correction levels.
Mastering Text Cases: Camel, Snake, and Kebab Explained
CamelCase, snake_case, kebab-case... confusion? A comprehensive guide to programming naming conventions and when to use each one.
HTTP Status Codes: Complete Developer Guide 2025
Master HTTP status codes from 200 to 599. Learn what each code means, when to use them, and how to debug API errors. Essential for every developer.
ThenCatch is a free developer toolkit. Learn more about us.