QR Code Generator
Turn text or URLs into crisp QR codes and download them as PNG or SVG.
Preview
Rendering…
Settings
#000000#ffffffHow QR Code Generator works
A QR code is a two-dimensional barcode that stores bytes in a grid of black and white modules. Encoding happens in four stages: your text is split into segments and mapped to one of four modes (numeric, alphanumeric, byte, or kanji), the resulting bit stream is padded to a fixed capacity, Reed–Solomon error-correction codewords are appended, and the whole payload is laid out in a zig-zag pattern around the three large finder squares in the corners.
The version number — 1 through 40 — sets the grid size, from 21×21 up to 177×177 modules. Higher versions hold more data but need more physical area or a higher-resolution camera to scan reliably. The encoder picks the smallest version that fits your content at the error-correction level you chose.
Error correction is what lets a scuffed or partly covered code still scan. Level L recovers about 7% of the codewords, M about 15%, Q about 25%, and H about 30%. That redundancy costs capacity: the same code that holds roughly 2,950 bytes at level L holds only about 1,270 at level H. For a code that will be printed on a sticker, laminated, or centre-punched with a logo, the extra redundancy is usually worth the shorter payload.
Everything here runs in your browser through the Canvas and SVG APIs. The text you encode is never sent anywhere, which matters when the payload is a Wi-Fi password, a signup link with a token in it, or an internal hostname.
Reference
- Capacity (bytes) shrinks as error correction rises: L ≈ 2953, M ≈ 2331, Q ≈ 1663, H ≈ 1273 at version 40
- Wi-Fi payload: WIFI:T:WPA;S:<ssid>;P:<password>;;
- vCard payload: BEGIN:VCARD\nVERSION:3.0\nFN:<name>\nTEL:<phone>\nEND:VCARD
- Geo payload: geo:<latitude>,<longitude>
How to use this generator
Enter your content
Paste a URL, plain text, or a structured payload such as a WIFI: or geo: string into the input field.
Choose an error-correction level
Stay on M for on-screen use; move to Q or H if the code will be printed, laminated, or overlaid with a logo.
Set the size and quiet zone
Pick an output size in pixels and keep the quiet zone — the blank margin — at four modules or more, or scanners will miss the code entirely.
Download the result
Export PNG for screens and messaging apps, or SVG when the code goes into print artwork and must stay sharp at any size.
Worked examples
A link on a conference poster
- Given
- https://example.com/talks/2026 at error-correction level Q, 1024 px PNG
- Result
- A version-3 code, 29×29 modules
Level Q survives a thumbprint or a torn corner. At 1024 px each module is about 35 px, which scans from two or three metres away.
Wi-Fi guest network
- Given
- WIFI:T:WPA;S:GuestNet;P:hunter2-hunter2;;
- Result
- A code that joins the network on scan, with no typing
iOS and Android both parse this scheme natively. Escape any of \ ; , : that appear inside the SSID or password with a backslash.
A code with a logo in the middle
- Given
- A 400-character URL at error-correction level H
- Result
- Roughly 30% of the code can be covered and it still decodes
Keep the overlay under about 25% of the code area in practice — level H tolerates 30% of codewords, not 30% of any arbitrary region.
When to use it
- Putting a signup or download link on printed material where typing a URL is impractical.
- Sharing a guest Wi-Fi network without reading a long password aloud.
- Encoding asset tags, serial numbers, or shelf locations for warehouse and lab inventory.
- Generating otpauth:// enrolment codes for two-factor authenticator apps.
- Adding a scannable vCard to a business card or email signature.
Things to watch out for
- The quiet zone is part of the specification, not decoration. Cropping the white margin below four modules is the single most common reason a printed code fails to scan.
- Contrast matters more than colour. Dark-on-light is required; inverted (light-on-dark) codes are read by some scanners and not others.
- QR codes carry no authentication. Anyone can print a sticker over yours, so avoid them for payment flows unless the destination is verified after the scan.
- Very long payloads produce dense codes that need a higher-resolution camera. If your URL is over ~300 characters, shorten it rather than raising the version.
Frequently asked questions
Do QR codes expire?
The code itself never expires — it is a static encoding of whatever text you gave it. What can expire is the destination: if you encode a URL and later remove that page, the code still scans but leads nowhere. Encode a stable URL you control if the code will be printed.
What is the maximum amount of data a QR code can hold?
At the largest version (40) and the lowest error-correction level (L), a QR code holds up to 4,296 alphanumeric characters, 7,089 digits, or 2,953 raw bytes. In practice anything over a few hundred characters produces a code too dense to scan comfortably from a phone.
Should I export PNG or SVG?
Use PNG for screens, chat apps, and slide decks. Use SVG for anything going to print: it is resolution-independent, so the code stays crisp whether it is on a business card or a billboard, and it keeps file size tiny.
Can I put a logo in the middle of the code?
Yes, if you generate at error-correction level H and keep the covered area under roughly a quarter of the code. Always test the result with two or three different phones before printing a run — the tolerance is statistical, not guaranteed.
Is my data sent to a server?
No. The encoding runs entirely in your browser and the generated image never leaves your device, so it is safe to encode Wi-Fi passwords, internal hostnames, or links containing access tokens.
Why does my code look different from another generator with the same text?
QR encoding applies one of eight mask patterns chosen to balance light and dark modules. Different libraries can select a different valid mask, or choose a different version or segment split, and still produce a code that decodes to exactly the same text.
Related Developers tools
All developer tools- QR Code Reader Decode QR codes from an image, a drag-and-drop file, or your webcam.
- TOTP Generator Turn an authenticator secret or otpauth QR code into live one-time passwords, with a 30-second countdown and one-click copy.
- Text Scrambler Shuffle characters or words with a reproducible seed and adjustable intensity.
- JWT Generator Build and sign HS256 JSON Web Tokens from a header, payload, and secret.
- JWT Decoder Inspect a token’s header and payload, with optional signature verification.
- Base64 Encode / Decode Encode and decode Base64 for text and files, with URL-safe support.