Scanning a QR Code That Is on the Phone in Your Hand — featured illustration
Guides

Scanning a QR Code That Is on the Phone in Your Hand

6 min read
Create a QR code

A phone cannot photograph its own screen. That is the whole of the problem, and no amount of holding the handset at a cleverer angle solves it. When the code you need to read is displayed on the device in your hand, the camera route does not exist, and every route that does work treats the code as an image file or as a link rather than as something in front of a lens.

This is a different problem from a code on a monitor or on somebody else's phone. There the camera works and the obstacles are brightness, moire and focus distance, which scanning a code from another screen works through. Here the camera is out of the conversation entirely.

Check whether it is a link before you decode anything

A surprising share of these cases need no decoding at all. Emails and web pages that show a code very often wrap the code image in a hyperlink pointing at the same destination, because the sender knows some recipients are reading on a phone. Long-press the image. If the menu that appears offers to open or copy a link, take it and stop; you have the destination without touching a decoder.

Two related shortcuts are worth the same three seconds. Many pages print the destination, or a short code, as text under the symbol, and typing eight characters beats any of the routes below. And if what arrived is a message saying "scan this code to continue", the sender's own page usually has a "having trouble?" link that skips the code.

On iOS

The fastest route needs nothing installed. Long-press the code image in Safari, Mail, Messages or Photos. iOS detects codes inside still images and adds the destination to the actions menu, so the link appears alongside the usual save and share options. Tap it. The exact wording moves between versions, and on some builds the code has to be reasonably large in the image for the detection to fire, so if the menu shows nothing useful, enlarge the image first and try again.

The second route is to save the image and open it in Photos. Long-press, add it to Photos, open it, and use the Live Text control that appears in the corner of a photo containing recognised content. The code is highlighted and the destination becomes tappable. A screenshot behaves identically: take one, open it from the thumbnail that appears, and use the same control.

The system Code Scanner in Control Centre does not help. It is a camera tool, so it is looking for a code in the room rather than on the display.

The share sheet is the fourth route and the only one that needs an install. A scanner app that registers a share extension appears in the share sheet for an image, so you can send a screenshot straight into it without saving anything to your library.

On Android

Long-press the image in Chrome and choose the Lens-style search action in the menu. Lens reads codes out of still images, so the destination comes back in the panel that opens. On most Android phones this needs no install, because Lens arrives with the Google apps that are already there. Scanning with Google Lens covers where the entry points sit and how much they move between manufacturers.

The second route uses the strip that appears at the bottom of the screen straight after a screenshot. On many phones that strip offers a Lens or search action that reads what is on screen without saving a file anywhere. Phones with Circle to Search do the same thing from a long-press on the home gesture: circle the code and the destination comes back.

The third is the slow reliable one: save the image, open the gallery or Photos, and use the Lens action on the picture. Several manufacturers also put their own scanner into the gallery app, so what the button is called depends on who made the phone and which version it is running. Treat Android as "there is a way in from the image, go and find it" rather than a fixed sequence of taps.

The route that works on everything

Save or screenshot the image, open a decoder in the browser that accepts a file, and pick the picture. No install, no version differences, no manufacturer variation. Scanning a code from a picture is exactly that, and a browser-based QR code reader covers the same ground for a code that arrived as a PDF page or an email graphic.

This route has a second advantage that matters when the code came from someone you do not know: it hands you the destination as text before anything opens. Looking at the domain for two seconds is the entire security layer available to you, and reading a code without opening the link explains why that step is worth taking on anything unexpected.

Crop first, for two separate reasons

Crop the screenshot down to the code plus its blank margin before you decode it. A decoder handed a full screenshot has to locate a small symbol inside a busy page, and cropping removes that work along with most of the reasons a decode fails.

The second reason is what else is in the frame. A full screenshot carries notification banners, account balances, message previews and whoever's name was at the top of the thread, and a cloud-based recognition service receives all of it rather than the part you cared about. Crop, then decode the crop.

Two cautions belong here. A code that regenerates every few seconds, which is how many tickets and sign-in screens work, is stale by the time a screenshot has been saved, so those need the live screen rather than a copy of it. And never scan a sign-in or pairing code that somebody sent you, however good the stated reason is: approving a pending session you did not start is the one action in this whole area that cannot be undone.

When none of it works

A code that has been through a chat app two or three times may simply be too small and too compressed to decode. Ask for the original file, or better, ask for the plain link. Whoever sent it has one.

A code inside a PDF is usually easier on a computer, where the page can be zoomed and the region cropped properly. And if the code is one you were meant to show rather than scan, a ticket, a boarding pass, a collection slip, then decoding it was never the task: what to do with a code you were handed sorts out which direction a given code points.

One last note for anyone on the sending side of this. If you are emailing a code, put the destination underneath as a plain text link, and make the code image itself a hyperlink to the same place. A fair number of your recipients are reading on the only screen they have, and those two lines of markup save all of them the routes above.

Share this article