QR Code Generator
Generate instant, free QR codes for URLs, text, WiFi, and more. Download high-quality PNGs with no expiration.
Formula
Modules per side = 4 ร Version + 17 (Version 1โ40 โ 21ร21 to 177ร177 modules)
Your text is packed into bits using the most compact mode it allows (numeric, alphanumeric, byte or kanji), Reed-Solomon parity codewords are added for the chosen error-correction level (L, M, Q or H), and the encoder selects the smallest of the 40 versions that holds the result. That version fixes the grid size: version 1 is 21ร21 modules and version 40 is 177ร177.
Worked Examples
Example 1: Sizing a printed QR code so it actually scans
Problem:A poster QR code must be readable from about 1 metre away. How wide should it be printed, and how small does each square get?
Solution:Scanners follow a distance-to-width rule of roughly 10:1, so a 1,000 mm reading distance needs a symbol about 1000 / 10 = 100 mm across. If the payload encodes as a Version 5 symbol, the grid is 4 x 5 + 17 = 37 modules per side. Each module is then 100 / 37 = 2.7 mm wide - far above the sub-millimetre limit where camera scanners start failing. Add the mandatory quiet zone of 4 modules on every side: 4 x 2.7 = 10.8 mm of blank margin, so reserve about 122 mm of clear artboard in total.
Result:100 mm symbol, 2.7 mm modules, 10.8 mm quiet zone on each side.
Example 2: Encoding Wi-Fi credentials as a guest network code
Problem:Share a WPA2 network named CafeGuest with the password Latte2026! without reading it out loud.
Solution:Wi-Fi codes use a documented plain-text schema rather than a URL: WIFI:S:CafeGuest;T:WPA;P:Latte2026!;; S is the SSID, T is the security type (WPA covers WPA2 and WPA3 on most handsets, nopass for an open network), P is the passphrase, and the payload closes with two semicolons. That string is 37 characters, so it is encoded in byte mode as 37 bytes. Version 1 tops out at 17 bytes at error-correction level L, so the encoder steps up to a larger version and the grid grows accordingly.
Result:A 37-byte payload that joins the network on scan - no typing, and no version 1 symbol.
Example 3: Choosing an error-correction level for a logo overlay
Problem:A brand wants its mark placed in the centre of a QR code. Which error-correction level makes that safe?
Solution:The four levels recover approximately 7 percent (L), 15 percent (M), 25 percent (Q) and 30 percent (H) of the codewords using Reed-Solomon parity. A centred logo typically obscures 5-10 percent of the symbol area, which level Q or H absorbs comfortably while L would not. The cost is capacity: parity codewords occupy space that data would otherwise use, so the same text encoded at H needs a higher version - a denser grid of smaller modules - than at L. Print larger to compensate.
Result:Level Q or H for logo overlays; expect a denser symbol and print it bigger.
Frequently Asked Questions
How does the QR Code Generator work?
Your text is encoded into a bit stream using the most compact mode it allows (numeric, alphanumeric, byte or kanji), Reed-Solomon parity codewords are appended, and the result is laid out on a square grid alongside the fixed finder, alignment and timing patterns that let a scanner orient the symbol.
Does my content leave my browser?
Yes. The pattern itself is rendered by an external QR image service, so the text you type is sent to that service in the image request URL. Everything encoded in a QR code is public by design - anyone who photographs it can read it - so treat the payload as public. Do not encode passwords, private keys or personal data you would not print on a poster.
Do these QR codes expire?
No. These are static codes: the destination is encoded directly in the pattern, so there is no redirect service that can lapse. The code works for as long as the URL or text it contains remains valid. The trade-off is that a static code cannot be edited after printing - a wrong link means a reprint.
What can I encode?
URLs, plain text, email addresses (mailto:), phone numbers (tel:), SMS messages (sms:), calendar events, geographic coordinates (geo:), Wi-Fi credentials, and contact cards in vCard or MeCard format. Handsets recognise these schemes and offer the matching action on scan.
How do I make a WiFi QR code?
Use the schema WIFI:S:NetworkName;T:WPA;P:Password;; - S is the SSID, T is the security type (WPA covers WPA2 and WPA3 on most devices, or nopass for an open network), and P is the passphrase. Close the string with two semicolons. Escape any semicolon, comma, colon or backslash inside a value with a backslash.
What is the maximum character limit?
A version 40 symbol at error-correction level L holds up to 7,089 digits, 4,296 alphanumeric characters or 2,953 bytes. Those are ceilings, not targets: a payload near the limit produces a 177 x 177 grid whose modules are tiny, so it must be printed large and scanned close. Short URLs scan far more reliably.
Can I customize the color?
This tool outputs standard black-on-white for maximum compatibility. If you recolour a code elsewhere, keep the data modules darker than the background - scanners read luminance contrast, not hue - and never invert to light-on-dark, which many decoders reject outright.
How do I scan the code?
Point your phone's camera app at it. iOS has decoded QR codes natively in the Camera app since iOS 11 (2017) and Android does the same through Google Lens, so no separate app is needed on any current handset.
What format is the download?
A PNG image. PNG is lossless, so the hard black-and-white edges stay crisp at any scale - unlike JPEG, whose compression artefacts blur module boundaries and can make dense codes unreadable.
How big should the printed code be?
Apply the 10:1 rule: divide the intended reading distance by ten. A code read from 1 metre wants about 10 cm across; a business card scanned at 20 cm needs only about 2 cm. Longer payloads pack more modules into the same area, so they must be printed larger to keep each module above roughly 0.4 mm.
Background & Theory
A QR code is not an image of your text - it is a bit stream laid out on a square grid, and every visual feature on it has a job.
How the grid is sized. Symbols come in 40 sizes, called versions. The side length in modules (the small squares) follows a fixed rule:
Modules per side = 4 x Version + 17
Version 1 is 21 x 21 modules and version 40 is 177 x 177. The encoder picks the smallest version that fits your payload at the error-correction level you chose.
How text becomes bits. Four encoding modes exist, and the encoder uses the most compact one your data allows:
| Mode | Character set | Bits per character |
|---|---|---|
| Numeric | 0-9 | about 3.33 |
| Alphanumeric | 0-9, A-Z, space, $ % * + - . / : | 5.5 |
| Byte | any byte, usually UTF-8 | 8 |
| Kanji | Shift JIS double-byte | 13 |
Alphanumeric mode is uppercase only, which is why an all-caps URL sometimes produces a visibly smaller code than the same URL in lower case.
Error correction. Reed-Solomon parity codewords are interleaved with the data so a scanner can rebuild the message from a damaged symbol. The four levels recover roughly 7 percent (L), 15 percent (M), 25 percent (Q) and 30 percent (H) of the codewords. Higher protection consumes capacity, so it pushes the encoder to a larger version.
Fixed patterns. The three large concentric squares are finder patterns that let a scanner locate and orient the symbol at any rotation. Smaller alignment patterns (present from version 2 up) correct for perspective distortion on curved or angled surfaces. Timing patterns - the alternating row and column between the finders - tell the decoder the module pitch. Format information around the finders records the error-correction level and the applied mask.
Quiet zone. The specification requires 4 modules of blank margin on all four sides. Cropping it is the single most common reason a technically valid code fails to scan.
Static versus dynamic. This generator produces static codes: the destination is encoded in the pattern itself, so nothing can change and nothing is tracked, but a wrong URL means reprinting. Dynamic codes encode a short redirect owned by a third-party service, which allows editing and scan counts at the cost of depending on that service staying alive.