All posts

How to Search Markdown Files with Spotlight on Mac

Learn how Spotlight Indexing lets you instantly find content inside your markdown files on macOS — and how OpenMark makes it automatic.

If you have hundreds of markdown files scattered across your Mac, finding the right one can feel impossible. Finder search works, but it only matches filenames — not the text inside your .md files. With proper organization of your markdown files and the right tools, macOS Spotlight can do full-text search instantly.

That's where Spotlight Importers come in.

What Is a Spotlight Importer?

Spotlight indexes the content on your Mac so you can search it instantly from the menu bar (⌘ Space). For standard file types like PDFs, Word documents, and plain text, Spotlight already knows how to read the contents. But markdown files use the .md extension, which Spotlight treats as an unknown format by default.

A Spotlight Importer is a small plugin that teaches Spotlight how to read a specific file type. Once installed, Spotlight can index the full text of those files — meaning you can search for a phrase like "project timeline" and find every markdown file containing those words, instantly.

How OpenMark Handles This

OpenMark ships with a native Spotlight Importer built in. When you install OpenMark, macOS automatically registers the importer. From that point on, Spotlight indexes the contents of every .md, .markdown, .mdown, .mkd, and .mkdn file on your Mac.

There's nothing to configure. Just install OpenMark and your markdown files become searchable through Spotlight like any other document.

What Gets Indexed

OpenMark's Spotlight Importer extracts the plain text content from your markdown files, stripping out formatting syntax. So if your file contains ## Meeting Notes, Spotlight indexes "Meeting Notes" — the actual words you'd search for, not the markdown syntax around them.

This means you can search for content naturally. Type a few words into Spotlight, and your markdown files show up alongside emails, PDFs, and everything else on your Mac.

Why This Matters

Most markdown editors on macOS are either Electron apps (which can't provide native Spotlight Importers) or they simply don't bother building one. The result is that your markdown files live in a search blind spot — visible to Finder by filename, but invisible to Spotlight by content.

If you use markdown for notes, documentation, journaling, or project planning, being able to search across all your files instantly changes how you work. You stop organizing files into careful folder hierarchies and start just writing — because you know you can always find it later.

Try It

Install OpenMark from the Mac App Store, open a few markdown files, and then try searching for their contents in Spotlight. The files will appear in search results just like any other document on your Mac.