Notes from the workbench

How to open and preview a Markdown file on a Mac

macOS opens a .md file as plain text. Here is how to read one in TextEdit or Quick Look, and how Branchway shows Markdown as a formatted page with an outline.

· 5 min read

A README open as a formatted page in Branchway, with an outline of its headings on the side and a find bar showing match 2 of 13.

The short answer: macOS has no Markdown viewer. TextEdit and Quick Look show a .md file as plain text, with the # and * marks still in it. In Branchway, select the file and press Space: it opens as a formatted page with an outline of its headings. Try Branchway free for 14 days.

The built-in ways come first. Branchway, our file manager for Mac, follows.

What is a Markdown file?

A Markdown file is a plain text file whose marks stand for formatting. A line that starts with # is a heading, **words** are bold, and a line that starts with - is a list item. The files usually end in .md or .markdown. README files in code projects, notes from many note apps and a lot of documentation are written this way.

Because it is plain text, any text editor can open it. Seeing it formatted needs an app that reads the marks.

How do you open an .md file on a Mac?

Open it with a text editor, such as TextEdit, from Open With. Step by step:

  1. Right-click the file in Finder.
  2. Choose Open With, then TextEdit, or another text editor you have.

You see the raw text. That is fine for a short note, and it is what you want when you need to edit the file.

To make TextEdit the app for every Markdown file, select one, press ⌘I for Get Info, choose TextEdit under Open with, then click Change All….

Can Quick Look preview a Markdown file?

It can show the text, not the formatting. Select the file in Finder and press Space. Quick Look opens the file as plain text, the same as TextEdit, without opening an app.

Some apps from the App Store add their own Quick Look extension that draws Markdown formatted. If you install one, Space in Finder uses it.

Where does the built-in way fall short?

On long files. Plain text works for a short note, but a long README or a set of notes is harder to read:

  • Headings, tables and code blocks look like symbols, not structure.
  • There is no outline, so in a long file you scroll to find a section.
  • Pictures that the file links to do not show.

If you read Markdown once in a while, TextEdit is enough. If you read it often, read on.

What is the faster way to read Markdown on a Mac?

Press Space on the file in Branchway and it opens as a formatted page. Branchway is our file manager for Mac, and it has shown Markdown this way since Branchway 1.0.3.

Open a Markdown file as a page

Select a .md or .markdown file and press Space. It opens formatted, with headings, lists, tables, code and pictures, in a window that follows your Branchway theme. Other kinds of file still open in Quick Look.

In the Markdown window:

  • The outline of the headings sits on the side. Click a heading to jump to it. ⌃⌘S shows or hides the outline.
  • ⌘F finds in the document. ⌘G and ⇧⌘G move to the next and previous match.
  • ⌘+ and ⌘− zoom, and ⌘0 goes back to actual size.
  • ⌘O opens the file in its own app.
  • ↑ and ↓ move to the previous or next file in the list you opened it from.
  • Space or Esc closes the window.

The arrow keys make a folder of notes easy to read through: open the first, then press ↓ for the next.

Keep it open while you edit

The Markdown window is for reading. To change the file, press ⌘O to open it in its own app. The page in Branchway updates when the file changes on disk, so you can keep it beside your editor and see the formatted result each time you save.

Pictures from the web

Pictures a note links to online load after the page and are kept for next time. To stop that, turn off Load pictures from the web in Settings › General, under Markdown preview. Each picture is then a box that names the site it is on.

If you would rather see Markdown the way Quick Look shows it, turn on Preview Markdown with Quick Look instead in the same place.

Preview Markdown beside the list

The preview pane in Branchway showing a Markdown file formatted, to the right of the file list.

You do not have to open a window at all. Choose View › Show Preview Pane or press ⇧⌘P, and a pane opens to the right of the list. It shows what you select: Markdown formatted, and pictures, PDFs, text, films and office files through Quick Look.

The arrow keys keep moving through the list while the pane follows, so you can read a folder of READMEs one after another. Click into the pane to find with ⌘F or zoom, and press Esc or Tab to go back to the list. Each tab remembers whether its pane is open and how wide it is.

The Inspector and the ⌘K preview show Markdown formatted too.

Which way should you use?

TextEdit when you need to change the file, Branchway when you want to read it. In short:

  • Editing a note, or reading a short one: TextEdit, or your own text editor.
  • Reading long READMEs and notes, with an outline, find and pictures: Branchway’s Markdown window or its preview pane.

A Markdown file can also be a workspace’s note, which keeps a project’s notes next to its folders; see the workspaces help page. To find a note by what it says rather than its name, read how to search files by content on a Mac.

Branchway runs on macOS 14 or later and costs $19 once at launch for one Mac. The trial is 14 days with every feature, and browsing, search and preview stay free after it, so reading Markdown does not need a license. Read the Markdown viewer and preview pane help page or try Branchway free for 14 days.

Questions people ask

How do I open an .md file on a Mac?

Right-click the file in Finder, choose Open With, and pick TextEdit or another text editor. The file opens as plain text, with the Markdown marks still in it. To see it formatted, you need an app that renders Markdown, such as Branchway.

Can Quick Look preview Markdown files formatted?

Not on its own. Quick Look in Finder shows a Markdown file as plain text. In Branchway, pressing Space on a .md or .markdown file opens it as a formatted page instead, and a setting lets you go back to Quick Look if you prefer it.

Is there a Markdown viewer built into macOS?

No. macOS has no app that shows Markdown formatted. TextEdit and Quick Look show the raw text.

Can I edit a Markdown file in Branchway?

Branchway shows Markdown, it does not edit it. Press ⌘O in the Markdown window to open the file in its own app. The page in Branchway updates when the file changes on disk, so you can keep it open while you edit.

Does Branchway load pictures in a Markdown file from the web?

Yes, after the page has loaded, and it keeps them for next time. To stop that, turn off Load pictures from the web in Settings › General, under Markdown preview. Each picture then shows as a box that names the site it is on.