How to search Markdown files on a Mac

Use Spotlight, the Terminal, your notes app, or one global shortcut. Updated August 2026.

For a quick built-in search, start with Spotlight. For exact recursive text search, use ripgrep. If your files already live in a notes app, use its index. If they are spread across ordinary folders and you want a keyboard-driven interface, use a dedicated local Markdown search app.

7-day free trial · 2.4 MB · local folder search · macOS 14+

Quick answer

Which Markdown search method should you use?

Built in

1. Try Spotlight first

Press ⌘Space, enter a phrase, and use the Files category to narrow the results. This costs nothing and is the right first step when Spotlight already indexes the file contents you need. Markdown content can require a compatible importer, so test it with a distinctive sentence from one of your files before relying on it.

Apple's Spotlight shortcuts include ⌘2 for files, Return to open a result, and ⌘R to reveal it in Finder.

Exact and free

2. Use ripgrep for recursive text search

For technical users, ripgrep is the most direct option. It searches folders recursively, prints matching line numbers, supports file globs, and respects ignore files by default.

rg -n -g '*.md' -g '*.markdown' 'project timeline' ~/Documents

This is better than a graphical app when you need regular expressions, scripts, or precise line numbers. By default, hidden files and ignored paths are skipped; its command-line flags let you include them when needed.

Already organised

3. Search inside your notes app

If your Markdown files already belong to an app, its own search is usually the shortest path. Obsidian Search supports search operators within a vault. FoldNotes can search titles and contents, show snippets, and include external Markdown folders.

The tradeoff is scope: app search is strongest inside the folders or vaults that app manages. It is less useful when notes are spread across project folders, Documents, and archives.

Across folders

4. Use a global Markdown search window

PX7 Markdown Find is our native Mac option for this case. Choose ordinary folders, press ⇧⌘O from any app, search file titles and contents, and open a result in your default Markdown app. It reads supported Markdown files into memory and refreshes after watched folders change; files are not uploaded or moved.

Its deliberate limits: no regular expressions or semantic search, and it opens the matching file rather than jumping to the exact line. Use ripgrep when either capability matters more than a global graphical interface.

PX7 Markdown Find showing a title and body match for a local Markdown search
The app shows the matching line, ranks title matches first and opens the selected file in your default Markdown app.

Terminal install:

brew install --cask px7digital/tap/px7-markdown-find

Quick answers

Markdown search questions

How do I search text inside Markdown files on a Mac?

Try Spotlight first. For exact recursive search, run rg -n -g '*.md' 'your phrase' folder. Use a dedicated local app when you want one graphical search across several ordinary folders.

Can Spotlight search inside Markdown files?

Sometimes. It depends on whether Spotlight has indexed the file contents with a compatible importer. Test a distinctive sentence from a known file before relying on it.

How do I search every .md file from Terminal?

Run rg -n -g '*.md' 'your phrase' ~/Documents. Add another -g option for extensions such as *.markdown.

Can I search Markdown folders without creating a vault?

Yes. A folder-based search tool can read the Markdown files where they already live. PX7 Markdown Find uses user-chosen folders and does not require a vault, import or cloud account.

PX7 Digital makes PX7 Markdown Find, so this page is not neutral. Product details for Apple, ripgrep, Obsidian and FoldNotes were checked against their official documentation on 26 August 2026. Tell us if something is out of date.