
You can use the Shortcuts app on your Mac to extract text from an image or PDF and copy the result to your clipboard. The easiest workflow uses Get File, Extract Text from Image, and Copy to Clipboard actions. You can run it from the Shortcuts app, Finder’s Quick Actions menu, or a keyboard shortcut.
This is useful for copying text from screenshots, scanned documents, receipts, photographed notes, and PDFs without typing everything manually.
Quick Answer
To create a Mac shortcut that extracts text:
- Open Shortcuts and click the + button.
- Add Get File from Finder.
- Add Extract Text from Image.
- Add Copy to Clipboard.
- Rename and save the shortcut.
- Run it, choose an image or PDF, and paste the extracted text wherever you need it.
The exact action names can vary slightly depending on the file type and macOS version. If the shortcut does not accept a PDF directly, convert or render the PDF page as an image first, or use Preview’s built-in text recognition.
What You Need to Know Before Creating the Shortcut
A shortcut can recognize text only when the source contains readable characters. It may struggle with:
- Blurry or low-resolution images
- Handwriting
- Decorative or unusual fonts
- Text that is rotated or heavily angled
- Poor contrast between the text and background
- Password-protected or damaged PDFs
- Scanned PDFs with complex page layouts
A PDF can contain either selectable text or page images. Selectable text is usually easier to copy directly. A scanned PDF may require optical character recognition, commonly called OCR. OCR converts visible letters in an image into editable text.
The shortcut may also produce imperfect results. Review names, numbers, dates, email addresses, and other important information before using the output.
Create a Shortcut to Extract Text from an Image
The following shortcut lets you select an image file, recognize its text, and place the result on the clipboard.
1. Open Shortcuts
Open Shortcuts from the Applications folder or search for it with Spotlight.
Select All Shortcuts in the sidebar, then click the + button in the upper-right corner to create a new shortcut.
2. Add the file-selection action
In the action search field, type Get File.
Add Get File from Finder to the shortcut workflow. This action opens a file picker when you run the shortcut.
Depending on the version of macOS installed on your Mac, the action may appear as Get File or use slightly different wording. Choose the action that lets you select a file from Finder.
If the action includes options such as Show Document Picker or Select Multiple, leave multiple-file selection turned off for this basic shortcut. Processing one file at a time makes it easier to identify and correct recognition errors.
3. Add text recognition
Search for Extract Text from Image, then add that action below the file-selection action.
Shortcuts should connect the selected file to the text-extraction action automatically. The workflow will look similar to this:
- Get a file from Finder
- Extract text from the selected file
If the action expects an image but does not accept the selected file, add Quick Look or an image-conversion action before it, if available. You can also use Preview to export the relevant PDF page as an image and process that image instead.
4. Copy the result to the clipboard
Search for Copy to Clipboard and add it below the extraction action.
Your final workflow should be similar to:
- Get File from Finder
- Extract Text from Image
- Copy to Clipboard
The extracted text is now copied automatically when the shortcut finishes. You can paste it into Notes, TextEdit, Pages, Mail, a web form, or another app with Command-V.
5. Name and test the shortcut
Click the shortcut name at the top of the editor and give it a descriptive name, such as Extract Text from File.
Click the Play button. Select an image that contains clear, printed text, then open a text editor and press Command-V.
If the pasted text is incomplete or incorrectly formatted, try a higher-resolution image or crop the image so the text is easier to recognize.
Make the Shortcut Work with PDFs
PDF handling depends on how the PDF was created.
PDFs with selectable text
If you can click and drag across words in Preview, the PDF already contains text. In this case, you may not need OCR.
Open the PDF in Preview, select the text, and press Command-C. Then paste it into your destination app.
You can still use a shortcut to automate parts of this workflow, especially if you want to save the copied text or send it to another app. However, a text-extraction action designed for images may not process every PDF directly.
Scanned PDFs
A scanned PDF is usually a collection of page images. If you cannot select individual words in Preview, the document probably needs OCR.
Try this workflow:
- Open the PDF in Preview.
- Select the page containing the text you need.
- Choose File > Export.
- Select an image format such as PNG or JPEG.
- Save the exported page.
- Run your text-extraction shortcut on that image.
Exporting a page creates a new file and does not change the original PDF. If you are working with a document containing private information, store the exported image securely and delete it when you no longer need it.
For more guidance on copying text from image files, see How to Copy Text from Photos and Images on a Mac.
Multi-page PDFs
The basic shortcut processes one selected file. It may not automatically extract every page from a multi-page PDF.
For a short document, export the pages you need as images and process them individually. For a longer document, use a PDF application with OCR support or a dedicated document-scanning workflow. A single shortcut can be expanded to process multiple files, but the setup is more complicated and may produce text in an unexpected order.
Add a Keyboard Shortcut
A keyboard shortcut makes the workflow faster after you have tested it.
- Open the shortcut in Shortcuts.
- Click the Details button, which may look like an information icon.
- Turn on Use as Quick Action if that option is available.
- Enable the option to assign a keyboard shortcut.
- Press the key combination you want to use.
- Close the details panel.
Avoid a combination already used by macOS or another app. A shortcut that conflicts with a system command may not run reliably.
You can also run the shortcut from the Shortcuts menu in the menu bar, depending on how it is configured.
Run the Shortcut from Finder
You can make the shortcut available in Finder’s contextual menu.
- Open Shortcuts.
- Select the shortcut.
- Open its details.
- Turn on Use as Quick Action.
- If offered, enable Finder input or file input.
- Close the shortcut settings.
In Finder, Control-click an image or supported file. Choose Quick Actions, then select your text-extraction shortcut.
This method can be more convenient than opening Shortcuts, particularly when the source file is already visible in a folder. If the shortcut does not appear, verify that Finder input is enabled and that the selected file type is supported.
Display the Extracted Text Instead of Copying It
Copying directly to the clipboard is convenient, but displaying the result helps you review it before pasting.
Open the shortcut and replace Copy to Clipboard with Quick Look or Show Result, if available. Run the shortcut and review the recognized text in the result window.
You can also keep both actions:
- Extract Text from Image
- Quick Look or Show Result
- Copy to Clipboard
This shows the result while still making it available for pasting. Keep in mind that the clipboard changes whenever you copy something else.
If you want to save the result permanently, add a file-saving action after text extraction. A shortcut can append or save the extracted text to a text file, but be careful when choosing an existing file. Depending on the action, saving may overwrite its contents. Test the workflow with a temporary file before using it for important notes.
Improve Recognition Accuracy
Good source material makes a bigger difference than shortcut settings.
- Use the original image instead of a compressed screenshot.
- Crop out unrelated graphics and background details.
- Straighten pages before processing them.
- Increase contrast when text blends into the background.
- Use adequate lighting for photographed documents.
- Avoid reflections and shadows.
- Capture the entire line of text when possible.
- Process a small section if a full page produces a disorganized result.
- Review punctuation, spacing, and line breaks after extraction.
For receipts, forms, and tables, expect additional cleanup. OCR may read columns from left to right instead of preserving the original layout.
Troubleshooting
The shortcut does not extract any text
Confirm that the selected file actually contains visible text. Try a clean image with large, dark lettering on a light background.
If the file is a PDF, determine whether it contains selectable text. If it does not, export the page as an image and run the shortcut on the exported file.
The extraction action is missing
Search for related terms such as Text, Image, or Recognize in the action list. Available actions can differ by macOS version and installed apps.
If no suitable action appears, use Preview to select and copy text when the PDF supports selection. For image files, use the system’s built-in text recognition features or a compatible OCR application.
The shortcut stops after selecting a file
The selected file may not be a supported input type, or the next action may expect an image rather than a PDF or generic document.
Test the workflow with a PNG or JPEG first. If that works, process PDFs by exporting their pages as images.
The output has strange line breaks
OCR attempts to reproduce the visual arrangement of the page. Columns, text boxes, headers, and footers can cause unexpected spacing.
Paste the result into a plain-text editor and clean up the formatting. For a table or multi-column document, process one section at a time.
Some letters or numbers are wrong
Compare the extracted text with the original image. OCR commonly confuses characters that look alike, such as the number 0 and the letter O.
Check dates, prices, account numbers, addresses, and other details manually before relying on them.
The keyboard shortcut does nothing
Open the shortcut’s details and confirm that the keyboard shortcut is still assigned. Try running the shortcut directly from the Shortcuts app.
If another app or macOS command uses the same key combination, assign a different one. You can also run it from Finder’s Quick Actions menu.
The shortcut asks for permission
macOS may ask whether Shortcuts can access a file, folder, or another app. Read the request and allow access only when it is necessary for the workflow.
If you decline access, the shortcut may not be able to read the selected file or save its output. You can review related permissions in System Settings, although the exact privacy category depends on what the shortcut is trying to access.
Frequently Asked Questions
Can a Mac shortcut extract text from a screenshot?
Yes. Add the screenshot as the shortcut’s input and use the text-extraction action. Clear, high-resolution screenshots usually produce better results than compressed images.
Can it extract text from a scanned PDF?
Often, but the PDF may need to be converted into page images first. If the PDF contains selectable text, copying from Preview is usually simpler.
Does the shortcut preserve formatting?
Not reliably. It can recognize words and characters, but columns, tables, fonts, colors, and exact page layouts may not be preserved.
Where does the extracted text go?
In the workflow described here, it goes to the clipboard. Paste it with Command-V. You can replace or supplement the clipboard action with a result window or a file-saving action.
Can I process several images at once?
A basic shortcut handles one file. You can modify it to accept multiple files, but the result may combine the text without clearly separating each image. Test with copies of your files before using batch processing.
Is extracted text private?
Treat the result as sensitive if the source contains personal, financial, medical, or work information. Avoid sending confidential documents to services you do not trust, and delete temporary exported images when they are no longer needed.
Final Thoughts
A Shortcuts workflow can turn an image or scanned document into editable text with only a few actions: select a file, extract the text, and copy the result. Start with a clear image, test the shortcut, and review the output carefully—especially when the text includes important numbers or personal information.