What an MD file is and why you can't just double-click it
An MD file is a plain-text document written in Markdown, a simple formatting language that uses symbols like asterisks and hyphens to mark headings, lists, and bold text. When you double-click an MD file, your computer doesn't know what to do with it because there's no single "default" program for Markdown files the way there is for Word documents or PDFs.
The good news is that MD files open in almost any text editor you already have. The file itself isn't broken or corrupted — it just needs the right tool. Which tool you choose depends on what you want to do: read it as plain text, see it formatted nicely, or edit it.
Key Takeaways
- MD files are plain text and open in any text editor, including Notepad on Windows or TextEdit on Mac.
- To see the formatted version (headings, bold text, lists) instead of the raw symbols, use a Markdown viewer or editor like VS Code, Typora, or an online tool.
- Right-click the MD file, choose "Open with", and select a text editor or Markdown viewer from the list.
- If you want to edit the file and save changes, use a text editor; if you only want to read it, a Markdown viewer shows you the final formatted look.
Opening an MD file on Windows
The fastest way on Windows is to right-click the MD file and choose Open with. You'll see a list of programs already on your computer. Notepad, WordPad, or any text editor will open the file immediately — you'll see the raw Markdown code with all the asterisks and brackets visible.
If you want to see the file formatted (headings displayed as headings, bold text actually bold), download a free Markdown viewer. VS Code is the most common choice — it's free from Microsoft and shows you both the raw code and a preview side by side. Typora is another option that shows only the formatted version and is easier for reading. Both are free to download.
To set a default program so MD files always open the way you want: right-click an MD file, choose Open with, select your preferred program, then check the box that says "Always use this app to open .md files". After that, double-clicking any MD file will use that program.
Opening an MD file on Mac
On Mac, right-click the MD file and select Open With. You'll see TextEdit (the built-in text editor) and any other text editors you have installed. TextEdit will show you the raw Markdown code. If you want to see it formatted instead, you need a Markdown viewer.
VS Code is free and works on Mac the same way it does on Windows. MacDown is a free Markdown editor built specifically for Mac and shows a preview pane. Typora also works on Mac and displays only the formatted version, which many people find cleaner for reading.
To set a default: right-click the MD file, choose Open With, select your program, then click Change All. Every MD file on your computer will now open with that program by default.
Opening an MD file on Linux
Linux systems usually come with a text editor already installed — often gedit, nano, or vim. Right-click the MD file and choose Open With to see what's available. Any of these will display the raw Markdown code.
For a formatted view, install VS Code (free, available through most Linux package managers) or Remarkable, a lightweight Markdown viewer designed for Linux. Both show you the formatted version alongside or instead of the code.
Using an online tool if you don't want to install anything
If you don't want to download or install a program, you can open an MD file in your web browser. Go to Markdown Editor (markdownlivepreview.com), Dillinger (dillinger.io), or HackMD (hackmd.io). Click the upload or open button, select your MD file, and you'll see the formatted version immediately.
These tools work on any device with a browser — Windows, Mac, Linux, or even a phone. You can read the file, and most of them let you edit it too. The file stays on your computer unless you explicitly save a copy to the website.
The difference between viewing and editing
If you only want to read the file and see how it looks formatted, use a Markdown viewer like Typora, Remarkable, or an online tool. These show you the final result without the code symbols.
If you need to change the content, use a text editor like Notepad, TextEdit, or VS Code. These let you add, delete, or modify text and save the changes back to the file. VS Code is popular for editing because it shows both the code and a preview at the same time, so you can see your changes as you make them.
What to do if the file won't open
If you get an error message, the file may be corrupted or the file extension may be wrong. Check that the filename actually ends in .md — sometimes files are saved as .txt or .markdown by mistake. If the extension is correct but the file still won't open, try a different program. Markdown files are plain text, so they should open in any text editor without errors.
If you're trying to open an MD file that someone sent you and you're not sure what it contains, start with an online viewer like Dillinger. That way you can see what's in the file before deciding whether you need to edit it or just read it.
Frequently Asked Questions
Can I open an MD file in Microsoft Word?
Yes, but Word will show you the raw Markdown code with all the symbols visible, not the formatted version. Word doesn't understand Markdown formatting. If you need the file in Word format, convert it first using an online tool like Pandoc or CloudConvert, which will turn the Markdown into a proper .docx file that Word can format.
What's the difference between .md and .markdown?
They're the same thing — both are Markdown files. Some people use .md as a shorter filename extension, others use .markdown. Any program that opens one will open the other. The content and formatting are identical.
Do I need to convert an MD file to read it?
No. You can read an MD file as-is in any text editor or Markdown viewer. Conversion is only necessary if you want to turn it into a different format, like a PDF or Word document, for sharing or printing.
Will editing an MD file in Notepad break it?
No. Notepad is a plain-text editor, and MD files are plain text. You can edit an MD file in Notepad, save it, and it will work perfectly in any other program. The Markdown formatting (the asterisks, hyphens, and brackets) will stay exactly as you type them.
Why would someone send me an MD file instead of a PDF or Word document?
Markdown files are lightweight, easy to version control, and common in software development and technical writing. They're also simple to convert to other formats. If someone sent you an MD file, they likely wanted you to read it in a specific way or possibly edit it yourself.