Files

How to search inside a file on Mac with Spotlight and Finder

You remember a sentence from a document, but not what you called it. Your Mac can search inside files, so the words are enough.

20 October 20266 min read

Read in: English · Español · Português · Deutsch · Français · Italiano

It happens to everyone. You know you wrote a letter, saved a bill or downloaded a recipe. You remember a phrase from it, maybe a name or a number. But the file is called something like "Scan 0042" or "Final copy 2", and scrolling through folders gets you nowhere.

Good news: on a Mac you do not need the file name. You can search in a file, meaning the words inside it. This guide shows two ways to do it by hand, with Spotlight and with Finder. Then it shows how to ask Key to do the looking for you.

Before you start: pick words that are likely to be in the file

Searching by content works best with words that are specific. "Invoice" appears in hundreds of files. A company name, a street, a person's name or an unusual phrase narrows things down fast.

  • Use one or two distinctive words, not a whole sentence.
  • A number can work well too, such as an account number or an amount.
  • If the first try shows too much, add one more word.

Search inside files with Spotlight on Mac

Spotlight is the quickest way. It is built into every Mac, and Apple describes it as a way to find your apps, files, emails, messages and more.

  1. Press Command + Space bar. The Spotlight search box appears.
  2. Type a word or two that you remember from inside the document. Results appear while you type, with the best match at the top.
  3. Use the arrow keys to move down the list. Look for a document in the results, not just a folder or an app.
  4. Press Space bar on a result to preview it with Quick Look. This lets you check the contents without opening the file.
  5. When you have the right one, press Return to open it.

If you want to know where the file lives

Sometimes you do not just want to read the file. You want to know which folder it is in, so you can move it or attach it to an email.

  1. Open Spotlight with Command + Space bar and search as before.
  2. Select the result you want.
  3. Hold down the Command key. The file's location is shown, and pressing Return while holding it opens the folder in Finder.

Tip: Press the Up Arrow in an empty Spotlight box to bring back your last search. That saves typing if you need to look again.

Search inside files with Finder

Finder gives you a bigger window and a longer list. This helps when Spotlight shows too many results at once, or when you want to look at a certain folder only.

  1. Click the Finder icon in the Dock (the blue smiling face) to open a Finder window.
  2. Click in the search box at the top right of the window, or press Command + F.
  3. Type the words you remember from inside the document.
  4. Under the search box, you may see a choice between searching by file name and searching by contents. Choose the one that mentions contents, so Finder looks inside the files and not only at their names.
  5. Use the bar that appears under the toolbar to choose where to look: your whole Mac, or just the folder you were in. A smaller area means fewer results.
  6. Double-click a result to open it.

Menus and wording change a little between versions of macOS, so what you see may not match this word for word. The idea stays the same: type your words, make sure the search covers contents, and pick the area to search.

Make the list shorter

  • Add a second word that you also remember.
  • Limit the search to a folder such as Documents or Downloads.
  • Sort the results by date, if you remember roughly when you last had the file.

When the file does not show up

Do not worry if the first search comes up empty. A few simple things usually explain it.

  • The words are spelled differently. Try another spelling, or a shorter part of the word.
  • The file is a scan or a photo. If a page was scanned as a picture, the words are part of the image and may not be searchable as text.
  • The file is brand new. Give your Mac a minute, then try again.
  • The file lives in a place Spotlight skips. You can check what Spotlight looks at in System Settings › Spotlight.

Ask Key to find it for you

If you would rather not click through results one by one, you can just say what you remember. Key is a free assistant for Mac and Windows. It finds files by what is inside them, not just by the name, and it reads the document to be sure it found the right one. If two files match, it asks which one you meant.

You can speak to Key or type to it. Both do the same thing, and half a sentence is enough. You might say "Find the electricity bill from March and put it on my Desktop", or just "Find my March bill".

KeyVoice

Find the letter that mentions the Harbor Street apartment

searched your files for Harbor Streetread the matching lettersopened the right one

I found the letter about the Harbor Street apartment and opened it for you.

Checked: the open document names Harbor Street in its first paragraph.

While Key works, a small panel shows what it is doing, and you can stop it at any point. When it is done, it reads the result back before it tells you, so you know it really found the file. If it moves a file for you, nothing is deleted for good. Anything Key removes goes to the Trash.

Key runs on any Mac with macOS 11 Big Sur or newer, Intel or Apple Silicon, and it is free to download. To see how it works in your everyday apps, read An AI assistant for your Mac that works in your real apps. For the same job on both Windows and Mac, see How to find a file by what is inside it, on Windows and Mac.

A quick recap

  • Press Command + Space bar and type words from inside the file.
  • Press Space bar on a result to preview it, Return to open it.
  • Hold Command on a result to see where it is stored.
  • In Finder, press Command + F, choose a contents search, and pick the folder to look in.
  • Or tell Key what you remember, and let it find and check the file.

The next time a file hides behind a strange name, you will not need to guess. The words you remember are enough.

Try Key free

Speak to it or type to it. It opens your apps, finds your files and changes your settings, then tells you what it did.

Free, no card. Windows 10 or 11, macOS 11 or newer.

More guides