About QR Code Generator & Scanner
QR Code Generator & Scanner turns any text into a downloadable QR image and reads a code back out of a picture you upload, paste, or point a camera at. Generation always produces a 640 by 640 pixel PNG at error correction level M, which is the setting most printed and on-screen codes use.
A QR code is a container for a string, nothing more. Phones treat certain prefixes specially, so https:// opens a browser and WIFI: offers to join a network, but the code itself has no idea what it holds. Two properties decide whether it will actually scan: the version, meaning the module grid the encoder chose to fit your content, and the error correction level, which trades capacity for the ability to read a damaged code. More content means a denser grid, and a denser grid has to be printed larger.
How to use this developer tool
- Choose Generate to build a code, or Decode to read one.
- In generate mode, type or paste the exact string to encode, including the scheme for a link, then run it and download the PNG.
- In decode mode, upload an image file, paste a screenshot directly into the result field, or start the camera.
- Read the decoded text in the result field before you act on it, especially before opening a link from a code you did not create.
- Print or embed the downloaded PNG at a size that keeps the modules crisp, and leave white space around it.
Worked example: a Wi-Fi join code
The Wi-Fi payload format needs its separators escaped, which is the detail that breaks most hand-written examples. This password contains a semicolon.
WIFI:T:WPA;S:Guest-5G;P:tr0ub4dor\;3;;data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAoAAAAKAC…
640 × 640 PNG, 5,198 characters of Data URL in total
QR version 3, 29 × 29 modules, error correction level MThe backslash before the semicolon in the password is required; without it the parser on the phone ends the password field early and the network never connects. The same escaping applies to backslash, comma, colon, and quotation marks inside any Wi-Fi field.
Error correction levels and maximum capacity
Capacity figures are for version 40, the largest grid. This generator is fixed at level M; the other rows explain what you give up or gain if you re-encode elsewhere.
| Level | Recoverable damage | Numeric | Alphanumeric | Bytes |
|---|---|---|---|---|
| L | about 7 percent | 7,089 | 4,296 | 2,953 |
| M (used here) | about 15 percent | 5,596 | 3,391 | 2,331 |
| Q | about 25 percent | 3,993 | 2,420 | 1,663 |
| H | about 30 percent | 3,057 | 1,852 | 1,273 |
Troubleshooting
The camera button reports that the camera is unavailable.
Why it happens Live scanning uses the browser's barcode detection API, which is available in Chromium-based browsers on desktop and Android but not in Safari or Firefox. Camera access also requires a secure context and a permission grant.
Fix Take a photo or a screenshot and use the upload button, or paste the image straight into the result field. File decoding works in every browser because it runs on a canvas.
Generation fails for a long string.
Why it happens At level M the largest QR code holds 2,331 bytes. Beyond that no version fits, and the encoder refuses rather than truncating.
Fix Shorten the payload. Replace a long tracking URL with a short link, drop unnecessary query parameters, and remember that non-ASCII characters cost two to four bytes each.
The printed code will not scan even though the file looks fine.
Why it happens Longer content raises the version, so the same physical size squeezes more, smaller modules into it. This generator also leaves a two-module quiet zone, while the specification recommends four.
Fix Print larger, shorten the content so the grid gets coarser, and add extra white margin around the image when you place it in a layout.
A photograph of a code is not recognized.
Why it happens The decoder needs the whole symbol, including the quiet zone, with enough contrast and focus. Glare, motion blur, a partially cropped finder pattern, or a photo of a screen with moire patterns all defeat it.
Fix Crop the image to the code plus a margin, avoid shooting a display at an angle, and prefer a screenshot over a photo whenever the code is on screen.
A scanned link opens the wrong page or fails to open.
Why it happens The code carries raw text, so a URL containing spaces or non-ASCII characters is passed to the browser exactly as encoded, and scanner apps differ in how they repair it.
Fix Percent-encode the URL with the URL Encoder before generating the code, and include the scheme; a string starting with www. is often treated as plain text rather than a link.
When this tool is the right choice
- Handing a staging URL, a device pairing string, or a long token to a phone without typing it.
- Building Wi-Fi, vCard, or otpauth payloads for testing an app that consumes them.
- Checking what a code on a poster, an invoice, or a package actually contains before following it.
- Producing a PNG for a slide, a README, or a print layout.
When to use something else
- Other barcode symbologies. This reads QR only, not EAN or Code 128 product barcodes, Data Matrix, PDF417, or Aztec.
- Distributing secrets. Anyone who can photograph the code has the content, including whatever is behind a shoulder.
- Tracking scans or swapping the destination later. A generated code is static; that needs a redirect service you control.
Privacy and data handling
Generation, image decoding, and camera frames are all handled in this browser tab: the image is drawn to a canvas and scanned locally, and no picture or decoded string is uploaded. The camera starts only after you press the camera button, and stops when you press it again or leave the page. A QR code is a public encoding, so treat anything you put in one as readable by whoever can point a lens at it.
Related developer tools
Frequently asked questions
Is the content of a QR code hidden?
No. It is a visual encoding with no key, and every scanner reveals the raw string. Anything sensitive in a code is visible to anyone who can photograph it, including from a distance.
Can I choose the size or the error correction level?
Not in this tool: it always outputs 640 by 640 pixels at level M. Download the PNG and resize it in an image editor, or use a QR library directly when a project needs level H for a code that will be printed on something that gets scratched.
Does scanning upload my image?
No. The file or camera frame is drawn onto a canvas in this tab and analysed there. Nothing about the image or the decoded text leaves the browser.
What payload formats do phones understand?
Common ones are a plain URL, WIFI: for network joining, tel:, SMSTO:, mailto:, BEGIN:VCARD for contacts, and otpauth:// for authenticator apps. Support varies by operating system, so test on the devices your users actually have.
Why did my code get denser after a small edit?
Because the content crossed a capacity boundary and the encoder moved to the next version, adding four modules per side. Shortening the string by a few characters can move it back.
How small can I print a QR code?
It depends on the version and the scanning distance. A practical rule is to keep each module at least 0.4 mm, then test with the oldest phone you can find.