QR code generator
Generate a QR code from any text or URL. Tune error correction, margin and colors; download as PNG or SVG.
What this QR code generator does
Type or paste any text — a URL, a Wi-Fi string, a vCard, plain words — and the
tool renders a QR code instantly using the qrcode library in your browser.
You choose the error-correction level, the quiet-zone margin and the two colors,
then download a 512×512 PNG or a vector SVG. No account, no watermark,
no tracking redirect: the code contains exactly what you typed.
How to use it
- Enter your text or URL in the box. The code updates as you type.
- Pick an error correction level (Low, Medium, Quartile, High).
- Set the margin (0–8 modules of quiet zone around the code).
- Choose foreground and background colors with the swatches.
- Click ↓ PNG or ↓ SVG to download.
Error-correction levels
| Level | Recoverable damage | Modules for a 30-char URL | Use when |
|---|---|---|---|
| L (Low) | ~7% | 25×25 | on-screen, scanned up close, maximum capacity |
| M (Medium) | ~15% | 29×29 | the default — good balance for web and print |
| Q (Quartile) | ~25% | 29×29 | outdoor signage, packaging that may get scuffed |
| H (High) | ~30% | 33×33 | you plan to overlay a logo or print very small |
Every step up in error correction adds data, and at some thresholds the symbol grows to the next version (one more ring of modules on each side). A larger version with the same physical size means smaller modules, which is harder to scan — so do not pick H by reflex.
Capacity by content type
| Content | Max characters at level L | Max at level H |
|---|---|---|
| Numeric only (digits) | 7,089 | 3,057 |
Alphanumeric (A–Z, 0–9, space, $%*+-./:) | 4,296 | 1,852 |
| Bytes (any UTF-8 text, lowercase URLs) | 2,953 | 1,273 |
Lowercase letters force byte mode, so HTTPS://EXAMPLE.COM/ABC encodes in
alphanumeric mode and yields a smaller code than https://example.com/abc —
scanners and browsers treat the scheme and host case-insensitively. The path
part is case-sensitive, so only uppercase it if your server tolerates it.
Special payload formats scanners understand
Phones recognize a few text conventions and offer an action instead of showing raw text:
https://webtricks.dev/tools/qr-generator open a link
mailto:hello@example.com?subject=Hi compose an email
tel:+14155550123 dial a number
SMSTO:+14155550123:Your message send a text
WIFI:T:WPA;S:MyNetwork;P:secret123;; join a Wi-Fi network
geo:48.8584,2.2945 open a map pin
For a contact card, paste a vCard:
BEGIN:VCARD
VERSION:3.0
N:Doe;Jane
FN:Jane Doe
TEL:+14155550123
EMAIL:jane@example.com
END:VCARD
Print and design checklist
- Minimum size. Rule of thumb for print is scan distance ÷ 10: a code scanned from 30 cm should be at least 3 cm wide. Posters need 10 cm or more.
- Keep the quiet zone. The spec asks for 4 modules of margin; the default here is 2, which works on a plain white page. Set it to 4 if the code sits on a busy background or next to other graphics.
- Contrast. Dark on light. If you must use brand colors, test the lighter one with a contrast checker — aim for a ratio above about 4.5:1 between foreground and background.
- Test on two phones (iOS camera and an Android camera app) before printing a thousand flyers. Shortened URLs scan more reliably than long tracking links.
Related tools and snippets
- URL encoder — percent-encode query strings before putting a URL in a code.
- Contrast checker — confirm custom QR colors have enough contrast to scan.
- SVG optimizer — minify the downloaded SVG before inlining it on a page.
- Image to Base64 — embed the PNG as a data URL in an HTML email or single-file page.
- Text and data tools — the post announcing this generator and its siblings.
FAQ
What does error correction do?
Each level adds redundancy so the code still scans when part of it is dirty, damaged or covered. L recovers about 7% of the symbol, M 15%, Q 25% and H 30%. Higher levels produce a denser code, so use L or M for clean on-screen codes and Q or H for print and logos.
Should I download PNG or SVG?
SVG for anything printed or resized — it stays sharp at any size and is tiny. PNG (rendered at 512×512) for chat apps, slides, email signatures and anywhere a raster image is expected.
Is there a maximum length?
A QR code holds up to 2,953 bytes at level L and 1,273 bytes at level H, but codes above a few hundred characters become so dense that phone cameras struggle. Keep URLs short; use a redirect if needed.
Can I use my brand colors?
Yes, pick any foreground and background. Keep the foreground dark and the background light with strong contrast — inverted codes (light on dark) fail on many scanners, and low-contrast pastel combinations fail on most.
Does the QR code expire or get tracked?
No. The code is generated in your browser and encodes your text directly, with no redirect through a third-party domain. It works forever and nobody can see who scans it.
Can I add a logo in the middle?
Not in this tool. If you overlay one yourself, generate the code at level H, keep the logo under about 20% of the area and leave the three corner finder patterns untouched.