A desktop has no rear camera, so scanning a printed QR code means using a webcam or an uploaded image. Browser scanners do this locally: the page gets camera frames through the browser API and decodes them in JavaScript, without uploading anything. This guide covers how to get a reliable scan, why HTTPS matters, and what to check before trusting a web scanner with a code.
What the Browser Needs
Camera access requires permission and a secure context. Browsers allow getUserMedia only on HTTPS pages or on localhost. A scanner served over plain HTTP will not see the camera.
Grant camera permission for the session, then select the correct device if the machine has several cameras. A laptop webcam is usually built for video calls, not for reading small printed codes.
Local decoding means the video frames stay in the browser. That is a privacy advantage over sites that ask you to upload a photo of the code.
Get a Reliable Frame
Hold the code flat and still, and keep the whole grid including its light margin inside the frame. A webcam often has a short focal distance, so the code may need to be 15 to 30 cm from the lens.
Light the code from the side rather than from behind. A glossy printed code under a desk lamp produces glare that no decoder can recover.
If the camera cannot focus, move the code rather than the camera. Many webcams hunt for focus on a flat high-contrast pattern.
A larger printed code scans far more reliably than a small one. For a desktop workflow, print at 40 to 60 mm if you control the artwork.
When a Webcam Is the Wrong Tool
A phone camera is better for most codes: better optics, better autofocus and native QR handling. Use a webcam when the code is already in front of the computer, such as a printed ticket, a package label or a document on the desk.
If the code is on the same screen the browser is rendering, the webcam cannot read it. Use a screenshot scanner or a second device.
For high-volume check-in, use a dedicated scanner app with a database lookup. A browser decoder that only returns the raw text cannot validate a ticket.
Privacy and Safety
Use a scanner that decodes locally and shows you the URL before opening it. A page that silently redirects to whatever the code contains is a quishing risk.
Close the camera session when you are done. The browser shows an indicator while the camera is active.
Do not enter credentials or card details just because a scanned code asked you to. Check the domain first.
A Quick Checklist
- Use HTTPS or localhost.
- Grant camera permission to the right device.
- Light the code from the side.
- Hold the whole grid steady in frame.
- Verify the decoded URL before opening it.
The screenshot scanning guide covers the case where the code is already a file.
