How to Scan a QR Code on a Computer or Laptop — featured illustration
Tutorials

How to Scan a QR Code on a Computer or Laptop

5 min read
Create a QR code

The code is sitting in a PDF invoice open in a browser tab, and every instruction you find online says point your phone at it. You cannot point a phone at a file. You could photograph the monitor, which works about half the time and produces a moiré-streaked mess the other half.

There are better options, and none of them need an install.

Upload the image and be done

The quickest route is to hand the picture to a decoder running in your browser. Save the code as a PNG or JPG, drag it onto a QR code scanner page, and read the result.

This works on any image the code appears in: a screenshot, a photo somebody emailed you, a page from a PDF exported as an image, a frame from a video. The decoder does not care that the code was never printed. It only needs enough pixels to resolve the modules.

One thing worth checking before you upload anything sensitive: whether the tool decodes in your browser or ships the file to a server. An invoice with account numbers on it is not a file you want sitting in somebody's upload folder. Tools that decode locally say so.

If the image is a photo of a physical code rather than a clean export, the upload-a-picture route is still the right one, but crop tightly around the code first. Extra background gives the detector more places to look and more chances to guess wrong.

When the code is already on your screen

You do not need to download anything if the code is displayed in front of you. Screenshot it, then feed the screenshot to the same scanner.

On Windows, Win + Shift + S opens the snipping overlay and lets you drag a rectangle straight around the code. It lands on your clipboard, and most browser scanners accept a paste directly.

On a Mac, Cmd + Shift + 4 does the same thing and drops a PNG on your desktop.

Crop close but leave the white margin around the code intact. That border is part of the specification, and cutting into it is the single most common reason a screenshot fails to decode when the original was perfectly readable. Four modules of white on each side is the requirement, which in practice means leave a visible frame of background.

Right-click it in Chrome

If the code is an image on a web page, Chrome will read it without any of the above. Right-click the image and choose Search with Google Lens. A side panel opens, Lens recognizes the code, and the destination link appears there for you to click.

This is the fastest method when it applies, and it fails in predictable ways. It needs the code to be an actual image element on the page, so a code rendered inside a canvas, embedded in a PDF viewer, or baked into a larger banner will not offer the option. Edge has a similar right-click path through its own visual search. Firefox and Safari do not, so screenshot and upload instead.

Using the webcam for something printed

If the code is on paper in your hand, a browser scanner can use your webcam. Open the scanner page, grant camera permission when the prompt appears, and hold the code up.

Laptop webcams make this harder than a phone does. They tend to be fixed-focus and lower resolution, which means the code has to be closer to the lens and steadier than you expect. Three things fix most failures:

  • Fill the frame. The code should take up a good half of what the camera sees, not sit in the middle of a desk.
  • Get the light behind the camera, not behind the code. Backlighting turns the whole thing into a silhouette.
  • Hold the paper flat against something rigid. Hand tremor at close focus blurs the modules badly, and a blurry code is unreadable long before it looks blurry to you.

External webcams generally do better than built-in ones. If you scan codes at a desk regularly, that is worth knowing.

Mac and Windows have their own shortcuts

Both operating systems can do some of this without a browser at all.

macOS recognizes links inside images through its built-in text and object recognition, so opening a picture of a code in Preview or Photos often surfaces the destination on its own. Windows leans on the Camera app, which handles webcam scanning natively, plus the snipping workflow above for anything on screen.

Both are worth a proper walkthrough with the exact menu paths, and both have one. Treat the summary here as the shape of it rather than the steps.

The phone fallback, and when it beats everything

Sometimes the phone is genuinely the better tool, and there is no prize for avoiding it.

If the code is printed on something curved, textured or glossy, a phone camera with autofocus and a flash will beat a laptop webcam every time. If you need to act on the result on your phone anyway, scanning it there saves you emailing yourself a link. And if the code is displayed on your monitor, photographing the screen with a phone actually works fine as long as you kill any overhead glare and hold the phone square to the display rather than at an angle.

The screen-photo approach has one quirk worth knowing. Monitor refresh interacts with phone camera shutters and can produce banding across the image. If your photo comes out striped, move slightly closer, or just screenshot instead.

If nothing decodes it

Work through this in order. Confirm the image actually contains a full code, all four edges included, since crops that clip a corner square are common in forwarded screenshots. Increase the image size if it is tiny; upscaling a 60-pixel-wide code rarely helps, but a browser zoom before screenshotting does. Try a second decoder, because implementations differ in how aggressively they handle low contrast, and a different reader sometimes reads what the first one refused.

If a specific code fails everywhere while others work fine, the problem is the code and not your setup. Contrast, missing quiet zone, and inverted colors account for most of it, and the usual failure causes are quick to check. Then ask whoever sent it for the plain link, which is what they should have included in the first place.

For codes you are scanning off physical objects rather than files, the phone-side technique is a different problem with different fixes.

Share this article