QR Code Generator
A QR code holds up to 2,953 bytes of text, or 7,089 digits, at the lowest error correction level (L, version 40). A short link like https://example.com fits in a 25 by 25 version 2 code at level M.
How to use
- Choose what the code should contain: plain text, a web link, an email, a phone number or a Wi-Fi network.
- Fill in the fields. The code updates as you type. For Wi-Fi, enter the network name, the password and the security type.
- Pick the error correction level. M suits most screens and prints; use Q or H if the code will be scuffed or carry a logo.
- Check the preview with your phone camera, then download SVG for print and design work or PNG for documents and slides.
How it works
The tool follows ISO/IEC 18004, the QR Code Model 2 standard. It looks at your content and picks the most compact encoding that fits all of it: numeric mode for digits only (about 3.3 bits per digit), alphanumeric mode for capital letters, digits and the symbols space $ % * + - . / : (5.5 bits per character), and byte mode otherwise, where text is stored as UTF-8 at 8 bits per byte.
It then picks the smallest version from 1 (21 by 21 modules) to 40 (177 by 177) that holds the data at the chosen error correction level. The data is split into blocks, each block gets Reed-Solomon error correction codewords over GF(256), and the blocks are interleaved and placed in a zigzag across the grid, around the three corner finder patterns, the timing lines and the alignment patterns.
Finally one of eight mask patterns is XORed over the data area so no large blocks or finder-like shapes appear by accident. The tool scores all eight with the four standard penalty rules (runs of five or more same-colored modules, 2 by 2 blocks, finder-like 1:1:3:1:1 patterns next to a light band, and imbalance between dark and light modules) and keeps the lowest. You can also force a mask in the options.
What each type puts in the code
| Type | Stored as | What a phone does |
|---|---|---|
| Text | Your text exactly as typed | Shows the text, often with a search or copy option |
| URL | The link; https:// is added if there is no scheme | Offers to open the page |
| mailto:address?subject=...&body=... | Opens a new message with the fields filled in | |
| Phone | tel:+15551234567 | Offers to call the number |
| Wi-Fi | WIFI:T:WPA;S:name;P:password;; | Offers to join the network |
How much fits
Maximum content of a version 40 code (177 by 177 modules). Real codes are usually far smaller, and a smaller code is easier to scan.
| Level | Numeric | Alphanumeric | Bytes |
|---|---|---|---|
| L (7%) | 7,089 | 4,296 | 2,953 |
| M (15%) | 5,596 | 3,391 | 2,331 |
| Q (25%) | 3,993 | 2,420 | 1,663 |
| H (30%) | 3,057 | 1,852 | 1,273 |
Printing and scanning tips
- Keep the margin (quiet zone) at 4 modules or more. Cropping it is the most common reason a code will not scan.
- Use dark dots on a light background with strong contrast. Inverted codes and pale colors fail in many scanner apps.
- Print the code at least 2 cm (about 0.8 in) wide, and larger for longer content or scanning from a distance.
- A shorter link makes a simpler, more robust code. If the content is long, a short URL on a domain you control is often better.
Sources and notes
- Encoding follows ISO/IEC 18004:2015 (QR Code bar code symbology specification). QR Code is a registered trademark of DENSO WAVE INCORPORATED.
- Wi-Fi codes use the WIFI: format documented by the ZXing project (Barcode Contents wiki), which Android and iOS cameras read. The characters \ ; , : and " are escaped with a backslash.
- This tool was checked by generating codes for all 40 versions at all four error correction levels and decoding them with two independent open-source readers.
FAQ
Do these QR codes expire?
No. The code is static: the content is stored in the pattern itself, with no server, redirect or tracking in between. It works as long as the thing it points to still exists.
Which error correction level should I choose?
M recovers about 15% of damage and is a good default. L gives the smallest, simplest code for clean screens. Q (25%) and H (30%) make the code larger but let it survive scratches, dirt or a logo placed over the middle.
Why can my text not fit?
A version 40 code holds 2,953 bytes at level L, and less at higher levels: 2,331 at M, 1,663 at Q and 1,273 at H. Accented letters and non-Latin text take 2 to 4 bytes each, so they fill the code faster than plain English.
SVG or PNG?
SVG is a vector file that stays sharp at any size, which is best for print and design software. PNG is a regular image. The PNG is drawn with a whole number of pixels per module so edges stay crisp; the size you enter is rounded to fit.
Is my data sent anywhere?
No. The code is built entirely in your browser, and nothing you type, including Wi-Fi passwords, leaves your device.