QR Code Generator
Create a QR code from any text or link.
Higher levels survive more damage but make a denser code.
How the QR code generator works
A QR code stores data as a grid of black and white squares called modules. This tool takes your text or URL, encodes it in UTF-8 byte mode (so accented characters, emoji, and any Unicode work), and lays the bits out on the smallest grid that can hold them at the error-correction level you choose. There is no formula to evaluate the way a loan or tax tool has one; the work is encoding, not arithmetic. Everything runs in your browser through a QR library, so no input is transmitted.
Two structural rules govern the output. The grid size is fixed by the version, numbered 1 (21x21 modules) to 40 (177x177), and each version step adds 4 modules per side: size = 17 + 4 * version. The encoder picks the lowest version that fits your data plus the redundancy added by the chosen correction level (L, M, Q, or H, recovering roughly 7, 15, 25, and 30 percent of the code). Around the whole grid sits the quiet zone, a 4-module blank margin the standard requires for reliable scanning.
Worked example
Encode the URL https://example.com at error-correction level M.
- The string is 19 characters, which is 19 bytes in UTF-8 (all ASCII).
- Byte mode adds a mode indicator and a length count, so the payload is a little larger than the raw bytes.
- Version 1 at level M holds only 14 bytes in byte mode, so 19 bytes does not fit.
- The encoder steps up to version 2, which holds up to 26 bytes at level M.
- Version 2 grid:
17 + 4 * 2 = 25, so the code is 25x25 modules. - Add the 4-module quiet zone on each side:
25 + 4 + 4 = 33modules wide overall.
| Property | Value |
|---|---|
| Input bytes (UTF-8) | 19 |
| Correction level | M (~15% recovery) |
| Version chosen | 2 |
| Grid size | 25x25 modules |
| With quiet zone | 33x33 modules |
Trim the URL to 14 bytes or fewer and it would fit in version 1 (21x21); longer inputs, or a higher correction level, push the encoder to larger versions to make room.
How to use it
- Paste a URL or type any text. Keep URLs short; fewer bytes means a smaller, easier-to-scan grid.
- Pick an error-correction level: M for screens and clean print, Q or H for small sizes, rough surfaces, or a code that may carry a logo.
- Export at a size where each module is at least a few pixels. Tiny codes with dense grids fail to scan.
- Leave the quiet zone intact. Do not crop the white margin or print other graphics against the edge.
- Test the result with a real phone camera before you print or publish it.
Limitations
This generator encodes exactly the text you give it and nothing more. It does not shorten links, track scans, verify that a URL is live, or check that a destination is safe, so confirm your link works before sharing. Very long inputs produce large, dense codes that need higher resolution and good contrast to read, and printing at a small physical size or on a textured surface can defeat even a high correction level. The code carries no expiry or analytics; if you need those, use a link service and encode its short URL here.
Frequently asked questions
Does my text or URL ever leave my browser?
No. The QR code is built entirely on your device by a JavaScript library, with no network request for the encoding. Whatever you type stays in the page, so you can safely encode a private link or a draft message without it being sent anywhere.
What is the quiet zone and why does it matter?
The quiet zone is the blank margin around the code, and the standard sets it at four modules wide on every side. Scanners use that empty border to find where the code starts and stops. If you crop it away or place the code tight against other graphics, many readers will fail to lock on, so the generator always keeps the full margin.
Which error-correction level should I pick?
Level M (about 15 percent recovery) is the common default and works for clean screens and print. Choose Q or H if the code will be small, printed on a rough surface, or might get a logo or smudge over part of it. Higher correction makes the grid denser because it adds redundant data, so do not jump to H unless you need the durability.
Can a QR code hold any length of text?
There is a ceiling. In UTF-8 byte mode the largest version (40) tops out near 2,953 bytes at the lowest correction level, and far fewer at higher levels. Long inputs force a larger, denser grid, which is harder to scan at small sizes, so short URLs and concise text scan most reliably.
Why does the same text sometimes produce a slightly different pattern?
A QR code includes a mask pattern chosen to balance the dark and light modules and avoid features that confuse scanners. The encoder evaluates several masks and applies the one with the best score, so a tiny change in input, or a change in error-correction level, can flip the chosen mask and shift the visible pattern while still decoding to the same content.