How-to

How to Preview a Markdown File on a Mac Without Opening an Editor

Updated August 25, 2026

macOS has no Markdown renderer. Select a README.md and the preview shows you hashes, asterisks and pipe characters — the source, not the document.

ComfortFiles renders it.

What you get

Headings at their real sizes, lists that look like lists, block quotes, tables with their columns lined up, and fenced code blocks coloured the way source files are. In the side panel while you browse, and under Space when you want the whole page.

A document full of links is only half a document if none of them work.

  • A link to another file opens it — the app goes to its folder with the file selected.
  • A link to the web opens your browser, not a window pretending to be one.
  • A link to a heading in the same document jumps to it.

Following a file link starts a chain, and the panel grows a Back and Forward pair for as long as the chain lasts. They disappear again when it ends, because a preview of an ordinary file has no journey to offer.

Wide tables

A table wider than the panel makes the page scroll sideways, with the bar at the pane’s own bottom edge. Breaking the cells to make them fit was tried and thrown away: it collapsed narrow columns into one letter per line, which is unreadable in a different way.

Nothing runs, nothing is fetched

The document is drawn with JavaScript off and no base address, so a relative reference in it resolves to nothing at all. Every character is escaped first: a <script> in a .md renders as the characters <script>.

That matters more here than it looks. A file manager previews files that arrive from anywhere — a download, a shared folder, a colleague’s drive — and looking at one must never set anything in motion.

Frequently asked questions

How do I preview a Markdown file on a Mac?

Select the .md in ComfortFiles. The side panel (⇧⌘P) renders it as a document, and Space opens the same document larger. macOS on its own shows Markdown as plain text — the hashes and asterisks — because it has no renderer for it.

Do links inside the document work?

Yes. A link to another file opens that file in the app — the folder it lives in, with the file selected. A link to the web opens your browser. A link to a heading inside the same document jumps to it. The panel keeps a Back and Forward pair while you follow them, so a chain of documents can be walked and walked back.

What does it render?

Headings, paragraphs, ordered and unordered lists, block quotes, tables with their column alignment, code blocks — coloured, like any other source file — inline code, bold, italic and links. The parsing is the system’s own Markdown parser, so what it understands is what Apple maintains.

Does it fetch images or run anything?

No. The page is rendered with JavaScript switched off and no base address, so nothing in a document can load an image, call home, or run a script. Every character of the file is escaped before it is drawn.