QR Code Generator
Type a link or some text and download the code as SVG or PNG. It’s a static code: the address is in the pattern itself, so it never expires and needs no account.
The full address, as you’d type it in a browser.
More optionsError correction M · black on white · PNG 1024 px
Error correction
How much of the code can be damaged and still read. Higher levels make a denser code; M suits most uses.
Colours
Contrast 21.0:1. Dark on light with strong contrast: easy to scan.
PNG size
Both downloads include the quiet zone, a light margin 4 modules wide that readers need around the code. Keep it when you place the code in a design.
ExampleLink QR code, static
25 × 25modules
It holds the address itself, so it never expires and works without this site.
- Version
- 2 (of 40)
- Data
- 19 of 26 bytes
- Reads back
- Checking…
How this works: Method, 10 sources, Checked against 3 worked examples,
How this works
Method
A picture or camera frame is decoded on this device, by the browser’s own barcode detector where it has one, else by the open-source jsQR decoder (a still image is retried smoothed and at half size). The text is shown, never opened: a link’s real domain is found with common Public Suffix List endings and checked for short links, look-alike letters, text before an @, IP addresses and plain http. New codes are encoded as UTF-8 in the smallest version that fits, then decoded again to check they read back.
Sources
- ISO/IEC 18004:2024, QR Code bar code symbology specification (2024)
- WCAG 2.2, 1.4.3 Contrast (Minimum) (2023)
- ZXing wiki: Barcode Contents (Wi-Fi, MECARD, URL)
- RFC 6350: vCard Format Specification (4.0) (2011)
- RFC 2426: vCard MIME Directory Profile (3.0) (1998)
- MDN: BarcodeDetector
- MDN: MediaDevices.getUserMedia()
- RFC 3492: Punycode (2003)
- Public Suffix List
- FTC: Scammers hide harmful links in QR codes (2023)
How it’s tested
3 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Changes
- First version: a scanner for camera, photos and screenshots with link checks, and generators for links, text, Wi-Fi and contacts with SVG and PNG downloads.
Worked example: a code for https://example.com
The generator writes the address as it is, https://example.com, 19 characters. That is 19 bytes of UTF-8. At error correction M version 1 holds 14 bytes, too few, and version 2 holds 26, so the code is version 2: 25 × 25 modules, or 33 × 33 with the 4-module quiet zone on every side.
The PNG download scales each module to a whole number of pixels so the edges stay sharp, and the SVG draws each run of dark modules as one rectangle, so it prints crisply at any size.
How the code is made
Your text is written as UTF-8 bytes in the code’s byte mode, then the encoder picks the smallest of the 40 QR versions that holds it at the error correction level you chose. Version 1 is 21 by 21 modules and each version adds 4 per side, up to 177 by 177 at version 40. The encoder adds Reed–Solomon error correction, tries the eight mask patterns and keeps the one that leaves the fewest confusing blocks and stripes, as ISO/IEC 18004 describes.
This is a static code: the address itself is in the pattern. Many generator sites make “dynamic” codes instead, which hold a short link to their own server and forward from there; those stop working if the subscription ends or the company closes. A static code keeps working as long as the address it holds does, with no account and no tracking.
Before you download, the page reads the finished code back with a QR decoder, in the colours you chose, and checks it says exactly what you typed. Shorter text makes a smaller, coarser code that scans from further away, so drop tracking parameters you don’t need from long links.
- A version 40 code at level L holds up to 2,953 bytes, and at level H up to 1,273: higher error correction leaves less room for data. Source: ISO/IEC 18004:2024, QR Code bar code symbology specification.
- QR codes need a quiet zone at least four modules wide on every side, which the SVG and PNG downloads here include. Source: ISO/IEC 18004:2024, QR Code bar code symbology specification.
- For text, WCAG asks for a contrast ratio of at least 4.5:1; this page uses the same bar for a code’s dark and light colours as a rule of thumb. Source: WCAG 2.2, 1.4.3 Contrast (Minimum).
How much a QR code holds
Bytes of text (byte mode) that fit in each version at each error correction level, found by asking the same encoder this page uses; ISO/IEC 18004 Table 7 lists the same numbers.
| Version | Modules | L (7%) | M (15%) | Q (25%) | H (30%) |
|---|---|---|---|---|---|
| 1 | 21 × 21 | 17 | 14 | 11 | 7 |
| 2 | 25 × 25 | 32 | 26 | 20 | 14 |
| 3 | 29 × 29 | 53 | 42 | 32 | 24 |
| 4 | 33 × 33 | 78 | 62 | 46 | 34 |
| 5 | 37 × 37 | 106 | 84 | 60 | 44 |
| 6 | 41 × 41 | 134 | 106 | 74 | 58 |
| 7 | 45 × 45 | 154 | 122 | 86 | 64 |
| 8 | 49 × 49 | 192 | 152 | 108 | 84 |
| 9 | 53 × 53 | 230 | 180 | 130 | 98 |
| 10 | 57 × 57 | 271 | 213 | 151 | 119 |
Show all 15 rowsShow fewer
| 15 | 77 × 77 | 520 | 412 | 292 | 220 |
| 20 | 97 × 97 | 858 | 666 | 482 | 382 |
| 25 | 117 × 117 | 1,273 | 997 | 715 | 535 |
| 30 | 137 × 137 | 1,732 | 1,370 | 982 | 742 |
| 40 | 177 × 177 | 2,953 | 2,331 | 1,663 | 1,273 |
Frequently Asked Questions
Do these QR codes expire?
No. They are static: the link or text is stored in the pattern itself, not on a server, so nothing can switch it off. The code keeps working for as long as the address it points to does. If you need to change the destination later, point the code at a page you control and change that page instead.
SVG or PNG: which should I download?
SVG for print and design work: it is drawn with shapes, so it stays sharp at any size, in Word, Illustrator, Canva or a print shop’s software. PNG for anywhere that wants a picture, such as an email, a slide or social media; choose a larger size if it will be printed big.
Which error correction level should I pick?
M suits most codes. Choose L to keep a long link as small and coarse as possible, and Q or H if the code will get scuffed, printed small on rough material, or partly covered by a logo. Higher levels make a denser code for the same text.
Can I use my own colours?
Yes, under More options. Keep the code dark on a light background with strong contrast: the page warns below 4.5:1 and when the colours are reversed, which some phone cameras can’t read. Check the read-back result before you print.