QR Code Generator
Create QR codes for links, text, email, phone numbers and WiFi networks, drawn in your browser and downloadable as PNG or SVG.
Updated Formula covered by automated tests
This generator builds a QR code for a web address, a block of text, an email address, a phone number or a WiFi network. It formats the data the way phone cameras expect (mailto: for email, tel: for phone numbers, and the WIFI: payload for networks), checks that it will fit, and lets you choose the image size and how much damage the code can survive.
Restaurants put menu links on table tents, landlords tape guest WiFi codes inside rental units, conference speakers add a link to their slides on the last page, and small shops print payment or review links on receipts. In each case the code saves someone from typing a long string on a phone keyboard.
Privacy note: the code is drawn in your browser by an open-source QR encoder, so the link, phone number or WiFi password you type is never uploaded. You can download the result as a PNG for messages and documents or as an SVG that stays sharp at any print size.
The formula
- V
- QR version: version 1 is 21 × 21 modules and version 40 is 177 × 177; the encoder picks the smallest version that fits your data
- module
- One black or white square of the code
- L, M, Q, H
- Error-correction levels that can restore roughly 7%, 15%, 25% and 30% of damaged codewords
- quiet zone
- The blank margin, at least 4 modules wide on every side, that scanners need to find the code
QR (Quick Response) codes were invented in 1994 by Masahiro Hara at Denso Wave to track car parts in Japanese factories, and the format is standardized as ISO/IEC 18004. The three large squares in the corners let a scanner find the code and its rotation from any angle.
Data is stored as codewords protected by Reed-Solomon error correction, the same family of codes used on CDs. A higher level adds more redundant codewords, which lets the code survive scratches, smudges or a logo placed over the middle, but it also leaves less room for data, so the same text produces a denser, larger version.
WiFi codes use a de facto format first popularized by the ZXing barcode project: WIFI:T:security;S:network name;P:password;; where any backslash, semicolon, comma, colon or double quote inside the name or password must be escaped with a backslash. This tool does that escaping for you.
Worked example
Rosa runs a café whose guest network is called Bean;Counter with the WPA2 password latte:art2024. She wants a 300-pixel code for the counter at the default medium error-correction level.
- 1 Escape the special characters: the semicolon in the name and the colon in the password each get a backslash, giving WIFI:T:WPA;S:Bean\;Counter;P:latte\:art2024;;.
- 2 Count the bytes: 5 (WIFI:) + 6 (T:WPA;) + 16 (S:Bean\;Counter;) + 17 (P:latte\:art2024;) + 1 (;) = 45 bytes.
- 3 Choose the version: at level M, version 3 holds 42 bytes and version 4 holds 62, so the code needs version 4, which is 17 + 4 × 4 = 33 modules wide.
- 4 Check print size: 300 px ÷ (33 + 2 × 4) = 300 ÷ 41 ≈ 7.3 pixels per module, comfortably sharp on screen and in print.
Result: Rosa gets a 33 × 33 module code that joins the network in one tap. Without the backslashes, phones would read the network name as just Bean and fail to connect.
Before you rely on the result
- Codes are drawn by your browser, so they work offline once the page has loaded, but very long text produces a dense code that cheap phone cameras may struggle to read; keep links short where you can.
- Basic format checks catch obvious typos, but the tool cannot confirm that a URL loads, a phone number is in service or a WiFi password is correct. Scan the finished code with two different phones before printing in quantity.
- Low contrast, inverted colors (light code on dark background), stretched images and missing quiet zones all reduce scan reliability no matter which error-correction level is chosen.
Frequently asked questions
Do these QR codes expire?
No. A code made here is static: the data is stored in the pattern itself, so it works as long as the printed image is readable. Paid "dynamic" QR services instead encode a short redirect link they control, which stops working if the subscription lapses.
Which error-correction level should I pick?
M is a good default for screens and clean print. Use Q or H for codes that will be handled, laminated, printed on curved packaging, or partly covered by a logo. Use L only when you need to squeeze a long text into the smallest possible code.
How big should a printed QR code be?
A common rule of thumb is a scanning distance of about ten times the code width, so a 2.5 cm (1 inch) code reads from roughly 25 cm away and a poster read from 3 m needs a code about 30 cm wide. Dense codes with more modules need to be larger still, and always keep the white margin.
Why will my phone not join the network from the WiFi code?
Check that the encryption type matches the router (WPA covers WPA2 and most WPA3 transition networks), that the network name is spelled with the exact capitalization, and that the hidden-network box is ticked if the SSID is not broadcast. Older Android versions and some iPhone models before iOS 11 do not read WiFi codes from the camera app.
Sources
- Denso Wave: History of QR Code (qrcode.com)
- ZXing wiki: Barcode Contents (WiFi network config) (github.com)