QR Code Generator
Type something and get a QR code, as an SVG that scales to any size without going fuzzy. Encode plain text or a URL, a contact card, or Wi-Fi credentials that join a network on scan. All four error correction levels, your own colors, and a quiet margin you can set. The encoder is written from the specification and runs entirely in your tab.
A code is drawn the moment the page loads. Type over the text and it redraws as you go.
Error correction is a real trade, not a slider to max out
A QR code carries redundant data so it still reads when part of it is dirty, torn or covered. Four levels are defined, and each one costs capacity:
| Level | Recovers about | Costs you | Use it for |
|---|---|---|---|
| L | 7% | least capacity | a screen, or a long URL that will not fit otherwise |
| M | 15% | a little | the default, and right for almost everything |
| Q | 25% | noticeably more | printed labels, packaging, anything handled |
| H | 30% | most | a code with a logo over its middle, or an industrial setting |
Higher is not better. Pushing a long URL to level H can force the code up several versions, which means a much denser grid of much smaller modules, which is harder to scan at the same printed size, not easier. The summary under the code tells you which version it landed on and how many modules a side, so the cost is visible.
Level H is genuinely necessary in one case: a logo placed over the center. The logo destroys modules, and only H has enough redundancy to survive it.
The mode is chosen for you, and it matters
QR codes have three encoding modes for ordinary text, and they differ enormously in efficiency. Numeric packs three digits into ten bits. Alphanumeric packs two characters into eleven, but its alphabet is only digits, uppercase letters, space and eight punctuation marks. Byte mode takes anything at eight bits a character.
The consequence is worth knowing about if you print URLs:
https://exploremydata.com/tools/qr-code-generator
byte mode, 48 characters, version 4
HTTPS://EXPLOREMYDATA.COM/TOOLS/QR-CODE-GENERATOR
alphanumeric mode, 48 characters, version 3
The same URL in uppercase fits in a smaller, less dense code, because the scheme and host of a URL are case-insensitive and alphanumeric mode is about 40% more efficient. This page picks the narrowest mode your text fits automatically, so you get the benefit without doing anything, and the summary names the mode it used.
Three payload types
- Text or URL. Whatever you type, encoded verbatim. A URL is what most codes carry and phone cameras open it directly.
- Contact card. Fills in a vCard 3.0 with the name, organization, job title, phone, email and website. Scanning it offers to save a contact. The name is split into given and family parts for the structured
Nfield, which is what makes the contact land correctly rather than as one blob in the first-name box. - Wi-Fi network. Encodes the SSID, the password and the security type in the
WIFI:format that Android and iOS both recognize. Scanning it offers to join the network. Characters that are structural in that format, the semicolon, comma, colon, backslash and quote, are escaped, which is what stops a password containing a semicolon from silently truncating the payload.
The Wi-Fi form also has a hidden-network flag, which is required for a code to join an SSID that does not broadcast.
Why SVG, and why the quiet margin is not optional
The download is an SVG, which is a description of the code's geometry rather than a grid of pixels. Print it at 15 millimeters on a label or at two meters on a poster and the edges stay perfectly sharp, because there are no pixels to enlarge. A PNG generated at 300 pixels and printed at poster size is a soft, unscannable mess.
The quiet margin is the clear space around the code, measured in modules. The specification asks for four, and it is not decoration: scanners find a code by looking for the finder patterns against a clear background, and a code printed flush against a border or a colored panel often will not be found at all.
You can set it to zero, for tiling or for placing inside a frame you are drawing yourself, and a warning appears when you do. The same goes for colors: the page computes the contrast between your two choices and warns when it drops below a scannable ratio, because scanners read contrast rather than hue and a tasteful pale-on-pale code does not work.
Written from the specification
The encoder is implemented here rather than pulled from a library: mode selection, the bit stream, Reed-Solomon error correction over GF(256), block interleaving, module placement, all eight mask patterns scored by the four penalty rules, and the two BCH codes for the format and version information.
The practical benefit is that the bulk page next door can hand a printable PDF a real module matrix rather than a rasterized image, and that nothing on this page depends on a script from somewhere else. It is tested against a hand-computed reference vector and by round-tripping generated codes through an independent decoder, across every error correction level and all eight masks.
Frequently Asked Questions
Do the codes expire, or get tracked?
Neither. This generates a static code, which is the QR code itself encoding your text directly. There is no redirect service in the middle, nothing to expire, no scan counter and no account. That also means the content is fixed: to change where it points, generate a new code.
How much text can one hold?
It depends on the mode and the error correction level. At level L, roughly 2,950 bytes of arbitrary text, 4,290 alphanumeric characters or 7,090 digits. At level H those drop to about 1,270, 1,850 and 3,050. Past the limit you get a message naming the ceiling and the length you gave, rather than a code that does not scan.
Can I put a logo in the middle?
Not on this page, but the SVG is easy to composite in any design tool. Set the error correction to H first: the logo destroys modules, and H is the only level with enough redundancy to survive it. Keep the logo under about a fifth of the width and test the result with a real phone.
Why is my custom-colored code not scanning?
Almost certainly contrast. Scanners read a QR code as dark and light modules, not as hues, so two colors of similar brightness are unreadable however different they look. The page warns when the contrast ratio drops below three to one. Also check the code is dark on light rather than light on dark, which some scanners will not invert.
What is the version number in the summary?
The size of the grid. Version 1 is 21 modules a side, and each version adds 4, up to version 40 at 177. It is chosen automatically as the smallest that holds your data at the error correction level you picked, so a shorter payload gives a less dense, easier-to-scan code.
Can I generate many codes at once?
Yes, on the CSV to QR codes page. Drop a CSV, pick the column to encode, and every row becomes a code, delivered as a zip of named SVG or PNG files or as a printable sheet.
Does anything I paste leave my computer?
No. There is no upload endpoint on this page and no network request in the code that does the work. JavaScript in your own tab reads the text, processes it and hands back the result. Nothing is stored between visits either, so reloading gives you an empty box again. You can confirm it by opening your browser's network panel and watching it stay quiet while you work.
A code that scales to any size
Free, no account, nothing transmitted, nothing to expire. SVG out, all four correction levels.
Back to the generator