A QR code turns a link into something anyone can open by pointing a camera at it. This generator builds the code entirely in your browser from a clean, from-scratch QR encoder, so there is no server, no account, and no tracking.
How it works
Generating a QR code is more than drawing squares. The encoder follows the QR Model 2 specification step by step:
- The URL is converted to UTF-8 bytes and wrapped in a byte-mode header with a length count and terminator.
- The data is split into blocks, and each block gets Reed-Solomon error-correction codewords computed over the Galois field GF(256). This is what lets a partly damaged or dirty code still scan.
- The data and error codewords are interleaved and woven into the module grid, skipping the finder, timing, and alignment patterns.
- All eight standard data masks are evaluated with the specification’s penalty rules, and the lowest-scoring mask is chosen so the final pattern scans reliably.
The matching BCH-protected format information is written in, and the grid is rendered to a crisp SVG.
Error correction levels
QR codes have four error-correction levels built into the specification. This generator uses level L (Low), which is appropriate for links displayed on clean screens where the code will always be in perfect condition. Here’s what each level tolerates:
| Level | Can recover from damage to… | Data capacity |
|---|---|---|
| L — Low | ~7% of modules | Highest |
| M — Medium | ~15% of modules | High |
| Q — Quartile | ~25% of modules | Medium |
| H — High | ~30% of modules | Lowest |
For URLs displayed on screen (a website, an email, a presentation slide), level L is ideal — maximum capacity means shorter, less dense codes that scan more reliably at smaller sizes. For printed codes that may be scanned while dirty, creased, or partially covered, level M or Q is more appropriate. A logo placed on top of the code is also possible at level H, since the code can recover from the covered modules.
URL length and QR version
QR codes grow in complexity to accommodate more data. Version 1 is a 21×21 grid; each version step adds 4 modules per side. For byte-mode data at error-correction level L:
- Version 1 (21×21): up to about 17 characters
- Version 3 (29×29): up to about 53 characters
- Version 5 (37×37): up to about 98 characters
- Version 8 (49×49): up to about 190 characters (this generator’s limit)
Most web URLs fit comfortably within version 5–6. If yours exceeds the limit, a URL shortener brings it inside the range and also produces a denser, more scannable code.
Why SVG and not PNG
SVG is a vector format: the image is a list of shapes, not pixels. A scanner or printer renders it at whatever resolution it needs. A PNG fixed at, say, 200×200 pixels looks sharp on screen but pixelates when scaled to a 5 cm print. The generated SVG prints cleanly at any size, from a business card sticker to a billboard, without re-exporting.
Tips and notes
Always test a generated code by scanning it before you commit it to print. Maintain a clear quiet zone (the tool adds one automatically) and keep high contrast between the foreground and background — dark code on a light background is safest. Avoid very light foreground colors, which can defeat a camera’s edge detection. A 1:10 contrast ratio or better (e.g. near-black on white) is the standard recommendation.