Markdown on a Mac

How to open .md files on a Mac

Updated 2026-10-10
In short: Any text app can open a .md file, but only an editor preview or a Markdown viewer shows it formatted. To change the default app, select the file, choose Get Info, pick an app under Open With and click Change All.

A .md file is a Markdown file. It is plain text with a few symbols for formatting: # for headings, * for emphasis, - for lists. Any Mac can open it. The question is whether you want to see the raw text or the formatted result, and whether you want to edit it or just read it. This page walks through the options and shows how to set the app that opens .md files by default.

Option 1: TextEdit

TextEdit comes with every Mac. Right-click the file in Finder, choose Open With, then TextEdit.

TextEdit shows the file as plain text. You see every #, * and link in its raw form. There is no preview. This is fine for a quick look at a short note. It is not pleasant for long documents, tables or code blocks.

Be careful when saving. TextEdit can switch a document to rich text. If that happens, save it as plain text again, or the file is no longer clean Markdown.

Option 2: a code or text editor

Editors such as Visual Studio Code, BBEdit, Sublime Text or Zed open .md files with syntax colouring. Many have a preview pane that shows the formatted document next to the source. In VS Code, for example, the Markdown preview is built in.

An editor is the right choice when you want to change the file. The downside: editors are heavy if you only want to read. Each file opens in a workspace with sidebars and panels, and it is easy to make an accidental edit.

Option 3: a Markdown viewer

A viewer opens the file and shows it formatted, ready to read. Headings, lists, tables, code blocks and images look like a finished document. A read-only viewer cannot change the file, so there is no risk of accidental edits.

Viewers are useful for documentation, README files, notes from other people, and Markdown that tools or AI assistants write. Some viewers also reload the view when the file changes on disk, so you can keep a file open while something else updates it.

Option 4: Quick Look in Finder

Quick Look shows a preview without opening an app. Select the file in Finder and press Space. Press Space again to close it.

Without an extra extension, Quick Look does not show Markdown formatting. Apps can add a Quick Look extension for Markdown. Once it is installed and enabled, pressing Space shows the formatted document. You can use the arrow keys to step through several files in a folder.

If the preview does not appear, the extension may be turned off. On macOS 15, look in System Settings ▸ General ▸ Login Items & Extensions ▸ Quick Look. On macOS 14, look in System Settings ▸ Privacy & Security ▸ Extensions ▸ Quick Look.

Set the default app for .md files

When you double-click a .md file, macOS opens it with the default app for that file type. You can change it for all Markdown files at once:

  1. Select any .md file in Finder.
  2. Choose File ▸ Get Info, or press ⌘I.
  3. Open the Open With section.
  4. Pick the app from the menu. If it is not listed, choose Other and find it in Applications.
  5. Click Change All, then confirm with Continue.

From now on, Markdown files like this one open in that app. If files with another extension, such as .markdown, still open elsewhere, repeat the steps with one of those.

To open a single file with a different app just once, right-click it and use Open With. This does not change the default.

Which option to choose

  • To read quickly without installing anything: TextEdit.
  • To edit: a code or text editor with a preview.
  • To read comfortably and avoid accidental edits: a Markdown viewer.
  • To glance at files while browsing folders: Quick Look with a Markdown extension.

Many people combine two: an editor for writing, and a viewer or Quick Look for reading.

Markko

Markko is a read-only Markdown viewer for macOS. It shows GitHub Flavored Markdown formatted, adds a Quick Look preview in Finder, and reloads when the file changes. It never changes the Markdown file. Markko is a free download on the Mac App Store and needs macOS 14 or later.

FAQ

Can I open a .md file without installing anything?

Yes. TextEdit opens it as plain text. You see the Markdown symbols, like # and *, but no formatting.

Why does my .md file open in Xcode or another app I did not expect?

macOS opens each file type with a default app. An app you installed may have registered itself for Markdown. Change it with Get Info, Open With and Change All.

Does opening a .md file in a viewer change it?

A read-only viewer only displays the file. Editors can change and save it, so be careful with unintended edits.

Can I see a formatted .md file without opening it?

Yes, with Quick Look. Select the file in Finder and press Space. To see formatting, you need an app that adds a Quick Look extension for Markdown.

Related

Read your Markdown in MarkkoFree on the Mac App Store. Quick Look, live reload and themes included.
Coming soon to the Mac App Store
Markko — the Markdown viewer for Mac. Free.Coming soon to the Mac App Store