NEEBARP TECH

How to copy text from a screenshot on a Mac (offline)

Updated · 7 min read · Neebarp Tech

Short answer

Open the screenshot in Preview, drag across the words, Control-click and choose Copy Text. That's Live Text, built into macOS, and it reads the picture on your Mac without uploading it. If you do this often, a tool with a shortcut saves the screenshot step: in Macaw, press ⌃⌥⌘T, drag over any text on screen and it's on your clipboard.

Some text can't be selected: an error message in a dialog, a slide in a video call, a scanned letter, a photo of a whiteboard, a caption burned into a video. The usual trick is to take a screenshot and run it through an online OCR site. That works, but it means sending your picture, and whatever is in it, to someone else's server.

You don't need to. Every Mac from the last few years can read text in pictures by itself, offline. Here are five ways to do it, from the built-in ones to the quickest, and none of them uploads anything.

1. Live Text in Preview, Photos and Quick Look (built in)

Live Text is the macOS feature that makes words in pictures selectable, as if they were typed. It works in Preview, Photos and Quick Look, among other places.

  1. Open the screenshot or photo in Preview (double-click it), or select it in Finder and press Space to open it in Quick Look.
  2. Move the pointer over the text. It turns into a text cursor.
  3. Drag across the words you want, Control-click the selection and choose Copy Text.
  4. Paste it wherever you need it with ⌘V.

In Photos it's the same: open the photo, drag across the text, Control-click and choose Copy.

Can't select anything? In Preview, choose Tools → Text Selection. If that doesn't help, check that Live Text is turned on in System Settings → General → Language & Region. Apple says Live Text isn't available in every language or region.

2. Screenshot straight to text, without saving a file

If the text is on your screen right now, you don't have to save a screenshot to your desktop first. Send it to the clipboard instead, then read it in Preview.

  1. Press Control-Shift-Command-4 and drag over the text. Holding Control copies the screenshot to the clipboard instead of saving a file.
  2. Open Preview and choose File → New from Clipboard (⌘N). The screenshot opens as an untitled picture.
  3. Drag across the text, Control-click and choose Copy Text.
  4. Close the window without saving it. No screenshot file is left on your Mac.

It's four steps, which is fine once in a while. If you do it every day, the shortcut and app options below are quicker.

3. A Shortcuts shortcut with Extract Text from Image

The Shortcuts app has an action called Extract Text from Image, which uses the same on-device text reading as Live Text. Apple says it reads every language Live Text does (since macOS 12.3). You can chain it with a screenshot to make your own one-click text grabber:

  1. Open Shortcuts and make a new shortcut.
  2. Add Take Screenshot.
  3. Add Extract Text from Image. It picks up the screenshot automatically.
  4. Add Copy to Clipboard.
  5. Give the shortcut a name and, if you like, a keyboard shortcut in its details.

You can also turn on Use as Quick Action in the shortcut's details, change the first step to receive images from Finder, and run it on any picture file with a Control-click.

4. A ten-line Swift script (for Terminal people)

Live Text is built on Apple's Vision framework, and you can call it yourself. Save this as ocr.swift:

import Vision
import AppKit

let url = URL(fileURLWithPath: CommandLine.arguments[1])
guard let image = NSImage(contentsOf: url)?.cgImage(forProposedRect: nil, context: nil, hints: nil) else {
    fatalError("Can't open \(url.path)")
}
let request = VNRecognizeTextRequest()
request.recognitionLevel = .accurate
request.usesLanguageCorrection = true
try VNImageRequestHandler(cgImage: image).perform([request])
for line in request.results ?? [] {
    print(line.topCandidates(1).first?.string ?? "")
}
Prints every line of text it finds in the picture.

Then build it once and run it on any picture. You need Apple's command line tools (Terminal offers to install them the first time you type swiftc).

swiftc -O ocr.swift -o ocr
./ocr ~/Desktop/Screenshot.png | pbcopy
`| pbcopy` puts the text on the clipboard instead of printing it.

We ran it on the screenshot at the top of this page on our MacBook Pro (M2 Max). It returned all eight lines, word for word, including the small 706 × 118 size label. The only slip: the long dash in the window title came back as a plain hyphen. The very first run took about 45 seconds while macOS loaded its text model; after that each run took under half a second.

5. Macaw: one shortcut, any text on screen

We make Macaw, so weigh this one with that in mind. One of its 50 tools, Copy Text from Screen, cuts the job down to a shortcut and a drag. There's no screenshot file and no app to open.

  1. Press ⌃⌥⌘T (Control-Option-Command-T), or click the tool's card in Macaw's island.
  2. Drag over the text you want, anywhere on screen: a video, a screen share, a scanned PDF, an app that won't let you copy.
  3. Let go. The text is on your clipboard, ready to paste.
Macaw's Copy Text from Screen selecting a paragraph about tides in a lecture video window, with the size of the selection shown beside it
Drag over the words, let go, paste. The text is read on your Mac.
  • It also reads QR codes and barcodes in the area you drag over.
  • It keeps your last 20 grabs, so you can copy an earlier one again.
  • If pasted paragraphs break in odd places, turn on Smart line breaks in its settings.
  • It asks for Screen Recording permission, but only reads the area you drag over. You can also hand it an image file, which needs no permission at all.

Already have the picture as a file? Drip's Read the words

Drip, our other notch app, does the same for a file. Drag a picture up to the notch and let go on Read the words: the text goes to your clipboard and Drip shows the first line so you know it worked. For a PDF, Copy the words copies the text of up to 60 pages, and if the PDF is a scan with no real text in it, Drip reads the first 20 pages as pictures instead.

Drip's notch open over a photo, IMG_4127.HEIC, with the pointer on Read the words and the top right reading Let go: Read the words, Copies the words
Drip's jobs for a picture. Read the words copies any text in it.

Which one should you use?

WayBest forNeeds a file?Cost
Live Text in Preview, Photos, Quick LookA picture you already haveYesFree, built in
Clipboard screenshot + PreviewText on screen, now and thenNoFree, built in
ShortcutsA one-click grabber you build yourselfNoFree, built in
Swift scriptBatches, or piping text into other commandsYesFree
Macaw: Copy Text from ScreenDoing it many times a dayNo$19 once, 3 days free
Drip: Read the wordsPicture and PDF files at the notchYes$7.50 once, 7 days free

Why offline matters here

The things people need text from are often private: a bank letter, a payslip, a work chat, a medical form. An online OCR site has to receive the whole picture to read it, including the parts you didn't need. Every method on this page reads the picture on your Mac. Live Text, Shortcuts and the Swift script use Apple's on-device text recognition, and Macaw and Drip use the same framework with no account and no upload.

Questions

Does Live Text work offline?

Yes. Recognising and copying the text happens on your Mac, and the picture isn't uploaded anywhere.

Can a Mac copy text from a video?

Yes. Pause the video, take a clipboard screenshot of the frame (Control-Shift-Command-4) and read it in Preview, or drag over it with a tool like Macaw's Copy Text from Screen.

Why can't I select text in a picture in Preview?

Choose Tools → Text Selection in Preview, and check that Live Text is on in System Settings → General → Language & Region. Very small, blurry or stylised text may not be recognised at all.

Can I get text out of a scanned PDF?

Yes. Open a page in Preview and use Live Text, or for the whole document drop it on Drip and choose Copy the words, which reads the scan's pages as pictures when there's no real text in it.