How to Open a .md File on Mac
A .md file is a Markdown file: plain text with a light formatting syntax. # Heading, **bold**, - list item. It is the format README files, documentation and most note apps use.
Because it is plain text, any text editor can open it. The question is really whether you want to read it or edit it.
The fastest way to read one
Select the file in Finder and press space. Out of the box you will see raw source, hashes and asterisks included, because macOS has no Markdown renderer built in.
Install a Quick Look extension and that same keypress renders it properly. That is covered in detail here, and it is the single best change you can make if you deal with .md files regularly.
Opening it to edit
Any text editor works, because the file is plain text:
- TextEdit opens it, showing raw Markdown. It is already on your Mac.
- VS Code, Sublime, Zed, BBEdit all open it, with syntax highlighting and usually a preview pane
- Typora, MacDown, iA Writer, Obsidian are Markdown-specific and render as you write
- TypeFire opens it with Command O and toggles between raw and rendered
Right-click the file, choose Open With, and pick one.
Stopping it opening in the wrong app
This is the actual annoyance. You install something, and now every .md file opens in Xcode, or TextEdit, or whatever claimed the type last.
To fix it permanently:
- Right-click any
.mdfile in Finder - Choose Get Info
- Under Open with, pick the app you want
- Press Change All, and confirm
Every .md file on your Mac will now open in that app. Some apps, TypeFire included, offer a one-click setting that does the same registration for you. There is more on that here.
If the file has no extension
READMEs sometimes arrive as README with nothing after it, or as .markdown, .mdown, .mkd. They are all the same format. Rename it to .md and macOS will treat it consistently.
If it opens as one long line
You have opened it in something that is not respecting line breaks, usually a word processor. Markdown is plain text and should be opened in a text editor or a Markdown app, not Pages or Word.
Reading versus editing, decided
Just reading? Install a Quick Look extension and press space. No app, no window, no decision.
Editing occasionally? Set a default Markdown app so double-clicking does the right thing.
Writing a lot of Markdown? A dedicated editor pays for itself, and a text expander for the repetitive syntax pays for itself faster.
One app for all three
TypeFire previews .md files in Finder with Quick Look, opens and edits them, can be set as your default Markdown app in one click, and expands abbreviations into the Markdown patterns you retype. Free.
Download for Mac or read the Markdown tour.
Store and manage your snippets with TypeFire
Free text expander for Mac. Type abbreviations, they expand instantly in any app.
Download Free for macOS