Searching text on macOS helps you quickly locate words, phrases, and code snippets across apps, files, and system menus. This guide explains built-in options like Spotlight, Finder, Quick Look, and app-level search tools, with keyboard shortcuts and settings that affect searching. You will learn how to perform basic and advanced searches, refine results, and troubleshoot common issues. The steps are relevant to recent macOS versions and follow Apple’s documented behavior, giving you a reliable reference for finding text on Mac.
Use Spotlight to Search Text on Mac
Spotlight is the quickest way to search for text, files, apps, and system settings. It can look inside compatible documents and apps when you type keywords. You can invoke Spotlight from the desktop or from within apps, and its results update as you type.
Keyboard Shortcut and Activation
Press Command–Space to open Spotlight. On computers with Touch ID, you can also press the Touch ID button. Spotlight appears at the top of your screen with a text field where you enter your search terms.
Searching for Text and Results
Type one or more words to find files, messages, emails, contacts, reminders, and manual notes that contain the text. Spotlight shows recent documents and apps so you can open items directly. On macOS Sonoma and earlier, results include documents, apps, Mail messages, and system preferences that match your query.
Tips to improve Spotlight results:
- Use precise keywords to narrow matches.
- Exclude terms using the minus operator (e.g., budget -2022).
- Prefer app-specific search when you know the source (e.g., Messages or Notes).
Search Text in Finder and File Systems
Finder includes text search options to locate words within file contents and metadata. You can search the current folder or extend the search to the entire startup disk, balancing speed with thoroughness.
Finder Search Field
Open a Finder window, click the search field at the top right, and enter your text query. By default, the search is limited to the current folder.
Smart Folder and System-Wide Search
Choose This Mac to search across your startup disk. System-wide searches take longer because they scan more locations and metadata. You can refine system searches using kind, date, and other attributes to focus on document types or time ranges.
Refine Finder Text Searches
Use modifiers in the search field or the matching options popup to refine results:
- Kind to filter by document type (e.g., PDF, email).
- Date to narrow results by creation or modification time.
- Name to match filenames that contain specific words.
Example of common modifiers:
| Modifier | Purpose | Notes |
|---|---|---|
| kind:pdf | Limits results to PDF files | Helps focus on document type |
| kind:mail | Limits results to Mail messages | Works with Mail content when indexing is enabled |
| name:budget | Matches filenames containing the word | Useful for locating named files quickly |
| date:last 7 days | Limits to items modified within a week | Supports relative time expressions |
Search Text in Notes, Messages, and Mail
Messages, Notes, and Mail expose dedicated search interfaces that integrate with Spotlight while offering in-app refinement options. These apps index content to make searches fast and accurate.
Messages App
Open Messages, click the search field at the top, and enter names, words, or phrases. You can filter by contact or conversation using the contact list next to the search field. Messages searches text in message bodies and names when iMessage and SMS indexing are enabled.
Notes App
In Notes, use the search bar at the top to find text across all notes or within a folder. Notes supports inline search highlighting so you can see where your query matches. Rich text and checklists are included in note text searches when indexing is active.
Mail App
In Mail, use the search field in the top-right to look for text within email bodies, subjects, and quoted text. If Mail doesn’t return expected results, check that Mailboxes are indexed and that smart mailboxes aren’t limiting scope unintentionally.
Use Quick Look and Preview to Inspect Text
Quick Look lets you preview documents and text files without opening them fully. This is helpful for confirming content before committing to an app. Preview provides more detailed navigation and text selection within PDFs and images with embedded text.
Quick Look Basics
Select a file and press Space to invoke Quick Look. Scroll through text content, and use the on-screen search box to find words within the preview. Quick Look is limited to file types that Apple supports for preview, such as plain text, RTF, and PDF.
Preview App Features
Open files in Preview for full search capabilities within the app. Use Edit–Find or Command–F to open the in-app search field. Preview highlights matches as you type and lets you navigate through occurrences. It also supports PDF text search when the PDF is text-based rather than an image.
Use Terminal and Command-Line Tools
For advanced users, the Terminal provides powerful text search options using grep, ack, and other tools. These methods are helpful when working with code, logs, or large text files where speed and precision matter.
Basic Grep Usage
Open Terminal and use grep to search for text within files:
grep -r "search-term" ~/DocumentsThis recursively searches for “search-term” in the Documents folder. You can modify paths and flags to change scope and matching behavior.
Additional Tools
Consider installing additional command-line tools via Homebrew for extended functionality. Common utilities include ag, rg, and ack, which offer faster, regex-aware searching in complex projects.
Troubleshoot and Optimize Text Search
If searches return fewer results than expected, check indexing and privacy settings. Rebuilding the Spotlight index can resolve inconsistencies when metadata or content is not found.
Spotlight Privacy and Permissions
System Preferences or Settings allows apps and volumes to be added to Spotlight’s Privacy list. Items in Privacy are excluded from search results. Remove unnecessary entries to broaden coverage.
Rebuild Spotlight Index
To reset Spotlight indexing, add the main disk to Privacy, restart, then remove it from Privacy and restart again. This forces a complete reindex and can resolve missing content issues.
Performance Considerations
System-wide searches and indexing use CPU, memory, and disk I/O. Searches are typically lightweight on modern hardware, but enabling extensive indexing across large external drives may affect performance. Adjust indexing scope to match your workflow.
Searching text on Mac is straightforward when you understand the available tools and how they interact. By using Spotlight, Finder refinements, app search features, and optional command-line utilities, you can reliably locate the content you need.