How to Scan a QR Code on Mac
Scan a QR code on your Mac or MacBook screen or in an image, read a printed one with your iPhone, and check where its link goes before you open it.
Your Mac or MacBook doesn’t come with a QR code scanner. Live Text in the Preview and Photos apps can find text, links and phone numbers in images, but it doesn’t read QR codes. So the way to scan one depends on where the QR code is.
- On your Mac’s screen, such as in a web page, a PDF or a screenshot, use TextSniper.
- On paper or on another device, use your iPhone’s camera, then open the page on your Mac with Handoff.
Scan a QR code on your Mac with TextSniper
TextSniper is a Mac app that reads text, QR codes and barcodes from anything on your screen. You don’t need a camera, your iPhone or a screenshot. Select the QR code in Safari, a PDF, a Messages chat or a FaceTime call, and TextSniper copies the link inside it.
TextSniper only reads what’s on your screen. For a QR code on paper, use your iPhone instead, as Scan a printed QR code with your iPhone explains.
Here’s how to scan a QR code with TextSniper.
-
Open the window where you see the QR code.
-
Click TextSniper’s icon in the menu bar and choose Read QR/Bar Code.
The first time you do this, macOS asks whether TextSniper can record your screen. Allow it, because TextSniper needs the Screen & System Audio Recording permission to see the QR code.
-
Click and drag around the QR code to select it. TextSniper copies the link or text inside the QR code to the clipboard.
-
Press Command–V to paste it wherever you want, such as Safari’s address bar or a message. If it’s a web address, check it before you press Return. Check where a QR code goes before you open it explains what to look for.
A QR code can also hold text, a contact or a Wi-Fi network. See What a QR code can hold for what you get then.
Give Read QR/Bar Code its own shortcut
If you scan QR codes often, give Read QR/Bar Code a keyboard shortcut of its own. TextSniper’s main shortcut, Command–Shift–2, is for Capture Text, which recognizes text you can’t select, such as the words in a picture, a scanned page or a paused video.
- Click TextSniper’s icon in the menu bar and open its settings.
- Click Shortcuts, click the field next to Read QR/Bar Code, and press the keys you want to use.
After that, press your shortcut instead of opening the menu, then drag around the QR code.
Open links as soon as TextSniper reads them
TextSniper can open a link the moment it reads it, so you don’t have to paste it into Safari. In TextSniper’s settings, click General and turn on Automatically Open Links. A link then opens before you can read it, even a link to a fake site, so turn it on only for QR codes you made yourself or trust.
Scan a QR code from an image or a screenshot
You don’t need to save a QR code as an image first. If it’s in a web page or a PDF, scan it right there. If it’s in an image file or a screenshot, open the image first.
- Open the image in Preview, or select it in Finder and press the Space bar to see it in Quick Look.
- Click TextSniper’s icon in the menu bar and choose Read QR/Bar Code, or press your shortcut for it.
- Click and drag around the QR code to select it.
- Press Command–V to paste the link or text wherever you want. If it’s a web address, check it before you open it, as Check where a QR code goes before you open it explains.
Scan a printed QR code with your iPhone, then open it on your Mac
None of the apps that come with your Mac can scan a QR code with its camera. Your iPhone can, as Apple’s guide to scanning a QR code with an iPhone describes.
Handoff lets you open a page from your iPhone on your Mac. For it to work, both devices need to be signed in to the same Apple Account, with Wi-Fi and Bluetooth turned on, and within about 10 meters, or 30 feet, of each other. Apple’s guide to handing off tasks between devices lists these. Turn on Handoff on both devices before you scan.
- On your Mac, open System Settings › General › AirDrop & Continuity and turn on Allow Handoff between this Mac and your iCloud devices.
- On your iPhone, open Settings › General › AirPlay & Continuity and turn on Handoff.
Then scan the QR code with your iPhone.
- Open the Camera app on your iPhone. If you added Scan Code to Control Center, you can tap it there instead.
- Hold your iPhone so the QR code is in the camera’s view.
- A link appears on the screen. Check the address, and if it’s the site you expected, tap it to open the page.
Now look at the Dock on your Mac. A second Safari icon appears near the right end, and that’s the page from your iPhone. Click it, and the page opens in Safari on your Mac. You can also press Command–Tab and choose it.
If the icon doesn’t appear, use AirDrop instead. In Safari on your iPhone, tap the Share button, the square with an arrow pointing up, then tap AirDrop and choose your Mac.
Check where a QR code goes before you open it
A QR code can lead to a fake site that asks for a password or a card number. The US Federal Trade Commission warns about QR codes in unexpected places, such as a sticker on a parking meter or an email you weren’t expecting. It advises you to check the address before you open it.
The site’s name is the part of the address between https:// and the next /. In https://www.apple.com/iphone, that’s www.apple.com, so the page is on Apple’s site.
Only the end of the name matters. In https://apple.com.account-check.net/login, the site is account-check.net, not Apple. Watch for misspellings too, such as aple.com.
Both ways in this article let you read the address before anything opens.
- With TextSniper, paste the address with Command–V in Safari’s address bar or any other app, and read it before you open it.
- On your iPhone, read the address in the link the Camera app shows before you tap it.
What a QR code can hold
A QR code doesn’t always hold a web address. It can hold plain text, contact details, or a Wi-Fi network’s name and password. When TextSniper reads a Wi-Fi QR code, the text you paste looks like this:
WIFI:S:Cafe Guest;T:WPA;P:espresso2026;;
The network’s name comes after S:, so here it’s Cafe Guest. The password is between P: and ;;, so here it’s espresso2026. You can ignore T:WPA, which only says what kind of security the network uses. To join, click Wi-Fi in the menu bar, choose the network and type the password.
Read barcodes and other codes with TextSniper
Read QR/Bar Code also reads barcodes and other codes, such as these.
- The barcode on a product in a shop, an EAN or UPC code.
- The code on a boarding pass or a train ticket, a PDF417 or Aztec code.
- The small square code on a parcel or a medicine box, a Data Matrix code.
- The barcode on a shipping label, a Code 128 code.
You scan them the same way as a QR code. A product’s barcode holds only its number, not the product’s name or price.
If TextSniper doesn’t read the QR code
When TextSniper can’t read a QR code, it doesn’t copy anything. The cause is usually one of these.
- You didn’t select the whole QR code. When you drag around the QR code, include all four corners and the white edge around it. Try again and drag a little wider.
- The QR code is too small on the screen. Press Command–Plus in Safari or Preview to zoom in, then scan the QR code again.
- Something covers the QR code. Before you scan, pause the video, move the pointer off the QR code, and close anything in front of it.
If TextSniper reads the QR code but Safari shows an error instead of the page, check that your Mac is online. If it is, the page has moved or been removed, or the QR code holds a wrong address. Ask the person or company that put up the QR code for the right address.