How to use
- Type or paste the text or URL to encode.
- Choose the error correction level, image size, quiet zone and colours.
- Press Generate QR code, test it with your phone camera, then download the PNG or SVG.
Formula / how it works
What is inside a QR code. A QR code is a grid of dark and light squares called modules. The smallest, version 1, is 21×21 modules; each version adds 4 modules per side, up to version 40 at 177×177. The generator picks the smallest version that fits your data at the error correction level you choose, so short text gives a simpler, easier-to-scan code. A 49-character URL needs version 4 (33×33 modules) at level M; the same URL at level H needs a larger version.
Encoding modes. QR codes store data in segments: numeric (digits only, the most compact), alphanumeric (upper-case letters, digits and a few symbols), and byte mode for anything else, encoded as UTF-8. The generator mixes modes automatically when it saves space, which is why a Wi-Fi string can report "Alphanumeric + Byte mode". Lower-case URLs use byte mode.
Error correction. QR codes use Reed–Solomon error correction, so a damaged or partly covered code can still be read:
- L recovers about 7% of the data;
- M about 15%, a good default for screens and clean print;
- Q about 25%;
- H about 30%, for codes that may get scratched or dirty, or that carry a small logo over the centre.
Higher levels need more modules for the same data, so the code becomes denser. If you add a logo, use H, keep the logo under about 20% of the area, and test the result.
Quiet zone. The standard asks for a blank margin of 4 modules around the code so scanners can find its edges. The default is 4; smaller margins save space but often fail when the code sits on a busy background or near other printing, and the tool notes that.
Size and print. The PNG is exactly the pixel size you choose, and the tool reports pixels per module. For screens, 2 or more pixels per module is enough. For print, a common rule is that the code should be at least 2 cm (about 0.8 inch) wide, and roughly a tenth of the scanning distance: a poster read from 2 metres needs a code about 20 cm wide. Use the SVG for print; it is vector, so it scales to any size without blurring.
Colours and contrast. Scanners need dark modules on a light background with strong contrast. The tool warns when the contrast ratio is under 4:1, and when the colours are inverted (light modules on dark), which many phone cameras still read but some older scanners do not.
Useful formats.
- URLs: include https:// so phones open the link directly.
- Wi-Fi: WIFI:T:WPA;S:network name;P:password;; lets phones join without typing the password.
- Email: mailto:name@example.com, and phone numbers as tel:+923001234567.
- Contacts: a vCard (BEGIN:VCARD…END:VCARD) saves a contact in one scan, though it makes a denser code.
Static, private and permanent. These are static QR codes: the data is stored in the image itself, so they never expire and do not depend on any service. That also means you cannot change the destination later; for that you need a URL you control, such as a short link that you can redirect. The code is generated in your browser and nothing is sent anywhere.
Check before printing. Always scan the final file with two different phones before a print run, at the size it will be printed.
Worked examples
A link at the default level M
Inputs: Text or URL: https://toolsfreehub.com/tools/qr-code-generator/; Error correction: M — about 15%; Size: 300; Quiet zone: 4; Dark colour: #000000; Light colour: #ffffff
Paste the URL https://toolsfreehub.com/tools/qr-code-generator/, keep level M, a 300 px size, a 4-module quiet zone and black on white. The 49-byte URL fits version 4; the downloaded PNG was decoded and returned the same URL.
Result: QR code: version 4 (33×33 modules), error correction M
Data: 49 bytes (UTF-8), Byte mode
Image: 300×300 px PNG (5.0 KB), 7.32 px per module including a 4-module quiet zone
A Wi-Fi code at level H
Inputs: Text or URL: WIFI:T:WPA;S:Cafe Guest;P:latte2026;; | Error correction: H — about 30% | Size: 512 | Quiet zone: 4 | Dark colour: #0f172a | Light colour: #ffffff
Enter WIFI:T:WPA;S:Cafe Guest;P:latte2026;; with level H, 512 px, a 4-module quiet zone and dark navy #0f172a on white #ffffff. High error correction moves it up to version 5; the PNG decoded back to the exact Wi-Fi string.
Result: QR code: version 5 (37×37 modules), error correction H
Data: 37 bytes (UTF-8), Alphanumeric + Byte mode
Image: 512×512 px PNG (9.5 KB), 11.38 px per module including a 4-module quiet zone
A grey code with a thin margin
Inputs: Text or URL: hello; Error correction: M — about 15%; Size: 256; Quiet zone: 2; Dark colour: #9ca3af; Light colour: #ffffff
Encode hello at level M and 256 px, with a 2-module quiet zone and grey #9ca3af modules on white #ffffff. The code still generates, but the tool warns about the low contrast and the margin below the standard 4 modules.
Result: QR code: version 1 (21×21 modules), error correction M
Data: 5 bytes (UTF-8), Byte mode
Image: 256×256 px PNG (3.0 KB), 10.24 px per module including a 2-module quiet zone
Warning: contrast 2.5:1 is low; aim for 4:1 or more.
Note: the standard quiet zone is 4 modules; smaller margins can fail on busy backgrounds.
Use cases
- Linking a poster or menu to a website.
- Sharing guest Wi-Fi.
- Adding a link to business cards.
- Labelling equipment and stock.
Tips & limitations
- Use the SVG for print.
- Keep a 4-module quiet zone.
- Use level H if you add a logo.
- Test with two phones before printing.
FAQ
Do these QR codes expire?
No. They are static; the data is in the image itself.
Which error correction level should I use?
M for most uses; H if the code may be damaged or has a logo.
How big should a printed QR code be?
At least 2 cm wide, and about a tenth of the scanning distance.
Can I change the link later?
Not in a static code; encode a URL you can redirect instead.
Can I make a Wi-Fi QR code?
Yes. Use the format WIFI:T:WPA;S:name;P:password;;.
Is my data uploaded?
No. The code is made in your browser.
Runs entirely in your browser. Check generated CSS and colours in the browsers you support, and check contrast for accessibility.