Markdown cheatsheet · Open .md on Mac

Opening .md files on Mac

macOS opens .md files, but it never renders them: Quick Look and TextEdit both show you raw markdown. Here's what does render, and how to make a real app the default.

The fastest way: Quick Look

Select the file in Finder and press Space. Quick Look shows you the contents without opening any app at all.

The catch, and it's the reason this page exists: macOS shows .md files in Quick Look as raw text. You'll see ## Setup rather than a heading. It's the fastest way to read a file, and it doesn't render markdown.

Your options on Mac

AppRenders markdownGood for
Quick Look (Space)No, raw textA two-second glance
TextEditNoRaw text, already installed
Safari / ChromeNo, without an extensionRaw text
XcodeYes, sort ofNothing, if you're not shipping apps
VS CodeYes, in a preview paneDevelopers
maxdownYes, in place as you typeReading and writing .md properly. Free.
TyporaYesSame idea, $14.99 one-time

TextEdit has one specific trap: it may open a .md file in rich text mode and start "helpfully" curling your quotes and capitalising things. If you're editing markdown in TextEdit, use Format → Make Plain Text (Shift+Cmd+T) first, or your file will pick up characters that break code blocks.

Making .md open in the app you want, permanently

This is the part people get stuck on, because doing it for one file doesn't do it for the rest.

  1. Click a .md file once in Finder to select it.
  2. Press Cmd+I (or right-click → Get Info).
  3. Open the Open with section.
  4. Pick your app from the dropdown.
  5. Click "Change All…", then confirm.
"Change All…" is the whole trick. Choosing the app in the dropdown changes that one file. The button underneath is what applies it to every .md file on your Mac. Skip it and you'll be back here next week.

Opening a file from the Terminal

open notes.md uses your default app, whatever you set above. open -a "maxdown" notes.md forces a specific one without changing the default, which is handy when you usually want VS Code but occasionally want to read.

The "damaged and can't be opened" message

If you install a markdown app and macOS says it's damaged and can't be opened, the file is almost never damaged. That message means the app isn't signed with an Apple Developer certificate, which costs the developer $99 a year. Small and free apps often skip it.

To open it anyway: right-click the app and choose Open, then confirm. On recent macOS versions, go to System Settings → Privacy & Security and click Open Anyway. Do this only for software you deliberately downloaded from a site you trust.

Common questions

Why does Quick Look show raw markdown?

macOS treats .md as plain text and has no markdown renderer built in. Quick Look plugins exist that add one.

Why did my .md file open in Xcode?

Installing Xcode registers it for a pile of text formats, .md included, and it quietly becomes the default. Use "Change All…" above to take it back.

Can I edit markdown in Pages?

Don't. Pages will convert it into a Pages document, and you'll lose the plain-text file that made it markdown in the first place.

Related syntax

· All markdown guides

Open the file. Actually read it.

Download maxdown

Free · no account · macOS, Windows & Linux