QR Code Generator
Turn a URL or any text into a QR code and download it as a PNG image. Codes are generated in your browser, contain your data directly and never expire.
How this QR code generator works
A QR code is a two-dimensional barcode standardised as ISO/IEC 18004. This page encodes your text with the open-source qrcode JavaScript library (version 1.5.1) running in your browser and draws the result on a canvas. The codes are static: the text itself is stored in the pattern, with no redirect service in between, so a code keeps working for as long as its destination does and nobody can track who scans it.
How to create a QR code
- Type or paste a URL or any text into Text / URL. Leading and trailing spaces are removed.
- Choose a Size: 180px, 240px, 320px or 512px. This is the width and height of the PNG, including the white border.
- Click Generate. Changing the text or size has no effect until you click it again.
- Click Download PNG to save
qrcode.png, then scan it with a phone before you print or publish it.
What the generator chooses for you
- Version (size of the grid) — from 1 (21 × 21 modules) to 40 (177 × 177), the smallest that fits your data.
https://codebeautify.devfits in version 2 (25 × 25); a typical Wi-Fi string needs version 3. - Encoding mode — digits, upper-case alphanumerics and other bytes are packed differently, and the library splits text into the most compact mix. Other text is encoded as UTF-8, so accented letters and emoji work but take 2–4 bytes each.
- Error correction — always level M. The level is not adjustable on this page.
- Quiet zone — a white border four modules wide, the minimum the standard calls for, is included in the image.
Error correction and capacity
QR codes use Reed–Solomon error correction, so a partly damaged or dirty code can still be read. Higher levels recover more damage but leave less room for data:
| Level | Recovers roughly | Used here |
|---|---|---|
| L | 7% of codewords | No |
| M | 15% of codewords | Yes |
| Q | 25% of codewords | No |
| H | 30% of codewords | No |
At level M, the largest code holds 5,596 digits, 3,391 upper-case alphanumeric characters, or 2,331 bytes of other text. We confirmed these limits with the same library version: one character more produces the error below. Long URLs are worth shortening anyway, because a denser grid is harder to scan from a distance.
What can a QR code contain?
Any text. Phone camera apps recognise some formats and offer an action, though support varies between phones and scanner apps:
| Content | Text to encode |
|---|---|
| Website | https://example.com/menu |
mailto:[email protected]?subject=Order | |
| Phone call | tel:+441234567890 |
| Wi-Fi login | WIFI:T:WPA;S:MyNetwork;P:secret;; |
| Location | geo:51.5007,-0.1246 |
In a Wi-Fi string, T is the security type (WPA, WEP or nopass), S the network name and P the password. A backslash must precede any ;, ,, :, \ or " inside the name or password.
Printing and scanning tips
- Size for the distance. A common rule of thumb is a code at least one tenth as wide as the scanning distance: about 2 cm on a business card, 10 cm or more on a poster read from a metre away.
- Scale by whole multiples. Download 512px and reduce it in your layout rather than enlarging a small image; turn off smoothing if your software blurs the edges.
- Keep contrast high. Dark modules on a light background scan most reliably; inverted codes fail on some readers.
- Leave the border alone. Do not crop the white margin or place text right against the code.
Common problems and fixes
| Message or symptom | Cause | Fix |
|---|---|---|
| “Could not generate QR code: The amount of data is too big to be stored in a QR Code” | The text exceeds the level M capacity above. | Shorten it, link to a page that holds the content, or use a URL shortener you trust. |
| “Enter some text or a URL.” | The field is empty or only spaces. | Type something, then click Generate. |
| Phone joins the wrong network, or not at all | Special characters in the Wi-Fi name or password were not escaped, or the security type is wrong. | Escape them with \ and check T:. |
| Downloaded code shows old text | The text was edited without clicking Generate. | Click Generate, then download again. |
| Printed code will not scan | Too small, blurred by scaling, low contrast, or the margin was cropped. | Print larger from the 512px file with high contrast and an intact border. |
Frequently asked questions
Is the text I enter sent anywhere?
No. The code is generated by JavaScript in your browser, so Wi-Fi passwords and other private text stay on your device.
Do these QR codes expire?
No. The data is stored in the code itself and no third-party redirect is involved. A URL code stops being useful only if the page it points to disappears.
Can I change the code after printing it?
No, a static code cannot be edited. If the destination might change, encode a URL on your own domain that you can redirect later.
Can I add a logo or change the colours?
Not with this tool, which draws black modules on white. Logos work by covering modules and relying on error correction to fill the gap, which needs a high level such as H; with level M there is little room to spare.
Can I use the codes commercially?
Yes. The images are yours to use on packaging, menus, flyers or websites. “QR Code” is a registered trademark of DENSO WAVE, which does not charge for using the technology.
Can I get an SVG or a larger PNG?
The page exports PNG only, up to 512 pixels. For large-format print, scale the 512px image by a whole-number factor with smoothing turned off, which keeps the module edges sharp.