How to search inside files on Mac

Updated 30 August 2026

You know the information is in a file somewhere. A clause from a contract, a figure from an invoice, a line from notes you took last year. You just don’t know which file. This guide covers searching the contents of files on a Mac rather than their names, what the built-in tools do well, and the one thing they cannot do.

1. Spotlight already searches inside your files

Press Command and Space and type a phrase from inside a document. Spotlight indexes the text of many file types, so it can match a sentence in a PDF, a Pages file or a Word document, not only the file name. Results appear grouped, with documents under their own heading.

Two things decide whether this works. The file has to be somewhere Spotlight indexes, and it has to contain real text. A PDF exported from a word processor has a text layer. A PDF made by photographing or scanning a page does not: it is a picture, and there is nothing for the index to read.

2. mdfind, for when you want to be precise

Spotlight’s index is queryable from Terminal, which is useful when the graphical results are too broad. This searches one folder and everything under it:

mdfind -onlyin ~/Documents "termination notice"

Drop -onlyin and it searches everywhere it has indexed. This is the same index Spotlight uses, so anything invisible to one is invisible to the other.

3. Where the built-in search stops

Spotlight matches text. That is a real limit rather than a bug, and it shows up in three ways.

It only finds the words you actually type. Tested on macOS 26.6.2 with a document reading “Annual compensation review”: searching for salary returns nothing, and so does pay. A control search for a word that is in the file returns it immediately, so the index is working. It simply has no notion that salary, pay and compensation are the same subject.

Text inside images stays invisible. Screenshots, photographed receipts and scanned contracts are pictures of words. Without OCR there is nothing to index.

It searches in one language at a time. If a document is written in German and you search in English, the words do not match, so the file does not appear.

4. Searching by meaning instead

The gap in every one of those cases is the same: keyword search needs your words to be the document’s words. Searching by meaning removes that requirement. You describe what the file is about and the search finds documents about that subject, whichever words they happen to use.

That is what BeaconFind does, and it runs entirely on your Mac. It reads the text inside your files, runs OCR over screenshots and scans so their words become searchable, understands over 50 languages so an English query can find a German document, and looks at photos by content so you can search for what is in them. Your files, their contents and your searches stay on the machine.

It needs Apple Silicon, an M1 or newer, on macOS 12 or later, and it is signed and notarized by Apple so it opens without a warning. The trial runs 14 days with no card.

Which approach fits your problem

Your situationWhat to use
You remember an exact phrase from the fileSpotlight, or mdfind to narrow it
You remember the subject but not the wordingSearch by meaning
The text is in a screenshot or a scanSomething that runs OCR
The document is in another languageCross-language search
You have forgotten the file name entirelyFind a file without its name

Frequently asked questions

Does Spotlight search inside files on a Mac?

Yes. Spotlight indexes the text inside many file types, including PDFs with a real text layer, Pages, Word and plain text, so searching a phrase from inside a document can surface it. It is doing a text match, not reading the document for meaning.

How do I search file contents on a Mac from the terminal?

Use mdfind, which queries the same Spotlight index. mdfind -onlyin ~/Documents "termination notice" searches that folder and everything under it. Adding -onlyin keeps the results to one place instead of your whole disk.

Why can't Spotlight find text I know is in a document?

Usually one of three reasons. The words you typed are not the words in the file, because Spotlight matches text literally. The file lives somewhere excluded from indexing, such as a location added under Spotlight privacy settings. Or the text is part of an image, as in a screenshot or a scan, and there is no text layer to index.

Can Spotlight find text inside a screenshot or a scanned PDF?

Not reliably. In a screenshot or a scan the words are pixels, not text. Reading them needs OCR, and a file with no text layer has nothing for the index to store.

Does Spotlight understand what I mean, or only the words I type?

Only the words. Probed on macOS 26.6.2: a document reading "Annual compensation review" is not returned by a search for "salary" or for "pay". Keyword search cannot connect one to the other, because it has no notion that they are related.

Are Intel Macs supported by BeaconFind?

No. The macOS build is Apple Silicon only, so it needs an M1 or newer, on macOS 12 or later.

Related guides