How to open an .md fileon Mac, Windows, Linux, iPhone and Android.
Any device can open a .md file as text. Seeing it formatted takes a Markdown viewer. Here is the way for each system.
macOS 14 or later. Reading is free; editing and reviews are one payment.
Quick answer
To open an .md file, use any text editor: it shows the raw text. To see the file formatted, use a Markdown viewer. On a Mac, DotMD opens .md files rendered for free. On Windows, Mac and Linux, Visual Studio Code has a built-in preview. On any system, GitHub renders a .md file in the browser.
·
How to open a .md file on each system
| System | Raw text | Rendered |
|---|---|---|
| Mac | TextEdit | DotMD, Quick Look in Finder |
| Windows | Notepad | Visual Studio Code preview |
| Linux | Any text editor | Visual Studio Code preview |
| iPhone, iPad, Android | Any text editor app | GitHub in the browser |
| Browser | Not needed | GitHub, for files in a repository |
If you do not know what the file is, read What is a .md file first.
Open an MD file on a Mac
Double-click the file. It often opens as raw text, full of # and **. To read it formatted, open it in DotMD: press ⌘O, or drag the file onto the window. Reading is free. You can also select the file in Finder and press Space for a Quick Look preview.
To open the file in plain text, use TextEdit: choose File → Open. See Reading Markdown for folders and tabs.
Double-click opens the wrong app
The app that opens a file by double-click is set per file type. To change it for every .md file, follow Apple's steps:
-
Select a .md file in Finder
Choose File → Get Info, or Control-click the file and choose Get Info.
-
Pick the app
In the Info window, click the arrow next to Open with and choose an app from the pop-up menu.
-
Click Change All
Click Change All… to use the app for every .md file. Skip this click if you want the choice to apply to this one file only. DotMD can also ask to become the default app the first time it starts.
Open an MD file on Windows and Linux
On Windows, Notepad opens the file as text. Newer versions of Notepad in Windows 11 can also show basic Markdown formatting. On Linux, use the text editor of your desktop. To see the file formatted, install Visual Studio Code, which runs on Windows, Mac and Linux and has a Markdown preview built in. Open the file, then press Ctrl+Shift+V to toggle the preview. Ctrl+K V opens the preview beside the text. On a Mac the shortcuts are ⇧⌘V and ⌘K V. The same commands are in the Command Palette, for example Markdown: Open Preview to the Side.
Open an MD file on iPhone, iPad and Android
Any text editor app can show the raw text of a .md file. This page does not name a mobile Markdown viewer, because it has not checked one against its official page. The sure way to see a file formatted on a phone is GitHub: a .md file in a repository is shown rendered in the browser.
Open an MD file in the browser
GitHub shows the rendered view of any Markdown file in a repository, including README files. That works for files that are already in a repository. For a file only on your computer, open it in a viewer on that computer.
The file shows # and ** on screen
You are looking at raw Markdown. The symbols are the formatting instructions, and the app you used does not read them. The file is fine. Open it in a viewer from the table above. To turn it into a document you can send, see Convert Markdown to PDF.
Questions about opening .md files
How do I open a .md file?
Open it in any text editor to read the raw text. To see it formatted, use a Markdown viewer: DotMD on a Mac, or the preview in Visual Studio Code on Windows, Mac and Linux.
Which app opens an MD file on a Mac?
TextEdit shows the raw text. DotMD shows it rendered, for free, and also previews it in Finder with Space.
How do I make .md files open in a different app on a Mac?
Select a .md file, choose File → Get Info, open the Open with section, pick an app and click Change All.
Why does my .md file look like plain text with symbols?
The app shows the file as text. The symbols are Markdown formatting. A viewer turns them into headings, bold text and tables.