About this tool
Scan QR codes with your computer or phone camera online, no app needed. If the camera is unavailable, upload or paste an image instead. Video is processed on your device and is never recorded or uploaded.
Typical uses
- Scan a code on your phone screen with a laptop webcam
- Read a QR code when you have no scanner app
- Test whether a printed QR code scans well
How to use
On an HTTPS page, start the camera and grant permission.
Place a QR code in view, or upload or paste an image if the camera is unavailable.
For example, to read a QR code at a counter, start the camera, grant permission and place the whole code within the preview.
Camera scanning needs device support, HTTPS or localhost, and browser permission. Decoded content is only displayed on the page.
Camera access requires HTTPS and browser permission. This page scans QR codes; use Barcode image decoder for a one-dimensional product barcode.
What happens after you click “Start camera”
- The page first checks that it is in a secure context (HTTPS or localhost) and that the browser offers the camera API. If not, it shows “Camera access requires HTTPS or localhost. Upload an image instead.” straight away and no permission prompt appears.
- Otherwise it shows “Waiting for camera permission. Place the QR code in view.” and requests video with facingMode: "environment", which prefers the rear camera. It is not an exact requirement, so a laptop with only a front camera still works. There is no camera switch on the page; to use a different camera, pick it in the browser’s site permissions. If permission is refused or the camera is busy, the message is “Could not open the camera. Check HTTPS and permissions, or upload an image.”
- While scanning, each attempt hands one whole video frame, at the camera’s actual resolution, to the QR decoder. After a miss it waits 500 ms before the next frame, so there are at most about two attempts per second plus the decoding time itself.
- The first successful read stops scanning and closes the camera (the video tracks are stopped) with “Scanned. The content is displayed here only.” To scan another code, click “Start camera” again. “Stop scanning”, or switching to an uploaded or pasted image, also closes the camera immediately.
- Camera mode reads QR codes only (the result type shows QR_CODE); it does not read barcodes, Data Matrix or other symbols. With several QR codes in view it returns just one of them.
- The decoded content is shown as plain text. Links and Wi-Fi settings are never opened or applied, and the page notes “Decoded content is never opened or visited automatically.” Video frames are processed in browser memory only and are neither saved nor uploaded.
How large the code must be in the frame: pixels per module, tested
Whether a code reads depends on how many pixels each module (the smallest black or white square) covers in the video frame, not on the distance as such. We drew QR codes for three payloads (error correction M, 4-module margin) into a 1280 × 720 grey frame and decoded each once the way camera mode does (one full frame) and once through the image-upload path (full size, then smaller copies). Each cell reads “camera / upload (code width including margin)”:
| Pixels per module | URL (29 modules) | Wi-Fi (33 modules) | 200-character URL (57 modules) |
|---|---|---|---|
| 1 | ✗ / ✗ (37 px) | ✗ / ✗ (41 px) | ✗ / ✗ (65 px) |
| 1.5 | ✓ / ✓ (56 px) | ✓ / ✓ (62 px) | ✗ / ✗ (98 px) |
| 2 | ✗ / ✓ (74 px) | ✓ / ✓ (82 px) | ✗ / ✗ (130 px) |
| 2.5 | ✓ / ✓ (93 px) | ✗ / ✓ (103 px) | ✓ / ✓ (163 px) |
| 3 | ✓ / ✓ (111 px) | ✓ / ✓ (123 px) | ✗ / ✗ (195 px) |
| 4 | ✓ / ✓ (148 px) | ✓ / ✓ (164 px) | ✓ / ✓ (260 px) |
| 6 | ✓ / ✓ (222 px) | ✓ / ✓ (246 px) | ✓ / ✓ (390 px) |
- At 1 px per module nothing reads. Longer content means more modules and more pixels: the 200-character URL only became reliable at 4 px.
- At some module sizes a single frame misses (the URL at 2 px and the Wi-Fi code at 2.5 px in the table). This is a known quirk of the decoding library at particular module sizes; the smaller-copy retry recovers it, but camera mode does not run that retry. So when an aimed code does not read, moving the phone slightly closer or farther helps more than holding still.
- Real footage adds focus, motion blur and glare; the table uses ideal images and only shows the lower bound for how much of the frame the code needs. For a code on a screen, enlarge it to fill at least a third of the frame before scanning.
Using an image instead: upload, paste and retries
If the camera is unavailable or cannot read the code, use “Upload QR code image” or paste a screenshot (You can also paste an image from your clipboard.). Images may be up to 30 MB and must have an image/* type or a png, jpg, jpeg, webp, gif or bmp extension. If the full image does not decode, the tool tries a copy with a long side of at most 1600 px (and no more than 80% of the original), then keeps shrinking by 80% until the long side drops below 80 px:
| Image size | Retries | Long side of the copies |
|---|---|---|
| 4032 × 3024 | 14 | 1600 → 88 px |
| 1920 × 1080 | 14 | 1536 → 84 px |
| 1280 × 720 | 12 | 1024 → 88 px |
| 640 × 480 | 9 | 512 → 86 px |
| 300 × 300 | 5 | 240 → 98 px |
| 100 × 100 | 1 | 80 px |
This path is exactly the one used by the QR code decoder, whose page has case-by-case tests for rotated, mirrored, inverted and partly covered codes. When photographing, let the code fill the centre of the picture rather than taking a wide shot from far away.
Messages and what to do
| Message | Cause and fix |
|---|---|
| Camera access requires HTTPS or localhost. Upload an image instead. | The page was not opened over HTTPS, or the browser (including some in-app browsers) does not offer getUserMedia. Open the site’s https address in the system browser, or use an image. |
| Could not open the camera. Check HTTPS and permissions, or upload an image. | Permission was refused, the device has no camera, or another app (a video call, say) is using it. Allow the camera in the browser’s site settings and reload. |
| Waiting for camera permission. Place the QR code in view. | Waiting for permission or the first frame. If it stays here, the browser’s permission request has not been answered yet or the camera has not delivered a picture. |
| No QR code found. Try a sharp, complete, high contrast image. | Only appears for uploaded or pasted images. In camera mode a miss shows no message; it simply keeps trying. |
| Image must be at most 30 MB. | The image is over 30 MB. Shrink it or crop to the code first. |
| Choose an image file. | The chosen file is not an image, for example a PDF, or a HEIC file the browser does not report as an image. |
| Copy failed; select the text below manually. | The browser refused clipboard access. Select the result text and copy it by hand. |
Sources
Frequently asked questions
Why won’t the camera start?
You need a device camera, an HTTPS page and permission granted in the browser.
Is scanned content saved?
No. It is only shown on the current page.
Can it scan barcodes?
This tool focuses on QR codes. Use the barcode image decoder for one-dimensional barcodes.
Suggest an improvement to this tool
Missing an option, something awkward to use, or a wrong result? Let us know.