What Is an MD File? How to Open .MD Files on Windows, Mac & Mobile
Learn what .md files are and how to open them as raw text or rendered Markdown on Windows, Mac, Linux, iPhone, and Android.

An .md file is a plain-text document that uses Markdown syntax. Open it with any text editor when you need to read or edit the source. Use a Markdown-aware editor or preview when you need to see headings, links, tables, and code as formatted content.
The right choice depends on your goal:
| You need to… | Start with… | What you will see |
|---|---|---|
| Read or edit the source | Notepad, TextEdit, or another text editor | Markdown characters such as #, **, and backticks |
| Preview formatted Markdown | VS Code, Obsidian, Typora, or another Markdown viewer | Rendered headings, links, lists, and code |
| Work on a README | A local preview, then the target Git platform | Local rendering first, repository context second |
| Build a note system | An Obsidian vault | Local .md files plus links, search, and notes |
What is an .md file?
The .md extension usually means that a file contains Markdown. Markdown is a lightweight text format that uses readable characters to describe structure. For example:
# Project brief
This is **important**.
- First step
- Second step
A plain-text editor shows that source exactly as written. A Markdown renderer turns the heading, bold text, and list into formatted output. Both views are valid. Use the source view to edit syntax and the rendered view to check presentation.
Markdown files appear in README files, software documentation, changelogs, exported notes, project briefs, and AI-generated documents. They are portable because the underlying content remains plain text.
How to open an MD file on Windows
Choose the method that matches your goal.
Read or edit the source in Notepad
- Right-click the
.mdfile. - Select Open with.
- Choose Notepad.
Notepad shows the raw Markdown. This is enough for a quick edit or for checking the file contents. It does not render headings, tables, task lists, or links as a formatted page.
Preview Markdown in Visual Studio Code
- Open the file in Visual Studio Code.
- Press
Ctrl+Shift+Vto open the Markdown preview. - Use the source and preview views together when you need to check formatting.
Visual Studio Code documents its built-in Markdown editing and preview features in its official Markdown guide. It is a good fit for README files and project documentation because it also supports file search, source control, and workspace links.
Set the default app for .md files
If Windows opens the file in the wrong app, change the file association:
- Open Settings → Apps → Default apps.
- Search for
.md. - Select the current app.
- Choose the editor or viewer that you want to use.
Microsoft documents this process in Change default apps in Windows. The available choices depend on the apps installed and the associations that they register.
If .md does not appear in the list, right-click an existing .md file and use Open with → Choose another app. Select an app and enable the option to always use it for .md files when Windows offers it.
How to open an MD file on Mac
Read or edit the source in TextEdit
- Control-click the
.mdfile in Finder. - Select Open With → TextEdit.
- If you save the file, keep it in plain-text mode.
TextEdit can read the file source, but it does not provide the same Markdown preview as a dedicated viewer. Use a Markdown-aware editor when you need to inspect the rendered result.
Preview Markdown in a dedicated editor
Open the file in VS Code, Obsidian, Typora, or another Markdown editor. For VS Code, press Cmd+Shift+V after opening the file to show the preview.
Set the default app for .md files
Apple’s current instructions are:
- Select an
.mdfile in Finder. - Choose File → Get Info.
- Expand Open with.
- Choose an app.
- Select Change All if you want that app for every file of the same type.
See Apple’s guide to choosing an app for a file. Do not select Change All when you only want to open one file with another app.
How to open an MD file on Linux
Use the file manager’s Open With menu and select a text editor or Markdown viewer. VS Code, Ghostwriter, MarkText, and many desktop editors can render Markdown. The exact menu name depends on your desktop environment.
For a terminal-only workflow, cat file.md or less file.md displays the source. A terminal renderer such as glow can display formatted Markdown, but install it only from a source that you trust.
How to open an MD file on iPhone, iPad, or Android
Mobile file managers can show the source, but support for rendered Markdown varies by app. Use this workflow:
- Save the file to the device’s Files or file-manager area.
- Use Share or Open with to send it to a Markdown-capable app.
- Use a preview mode when you only need to read the file.
- Keep the original file when you convert or edit it.
Long tables, code blocks, embedded images, and Mermaid diagrams can render differently on a small screen. If the file contains private information, avoid uploading it to an online viewer unless you understand where the file is processed and stored.
Should you open an .md file in Obsidian?
Use Obsidian when you want to keep Markdown files in a local knowledge system. Obsidian’s official data-storage documentation explains that a vault is a folder on your local file system and that notes are Markdown-formatted plain-text files.
Obsidian is not the best choice for every one-off file. It is designed around vaults, so a file outside a vault may need to be imported or moved into one. The official Markdown import guide lists two supported paths: drag files or folders into the File explorer, or move them into the vault folder with the operating system’s file browser.
Use this decision rule:
| Situation | Better starting point |
|---|---|
| You received one file and only need to read it | A local Markdown preview or text editor |
| You maintain README files and technical docs | VS Code or another code editor |
| You want links, search, daily notes, and projects | An Obsidian vault |
| You want a ready-made system for notes and execution | Obsibrain |
If you move a file into an Obsidian vault, check its links and attachments after import. Obsidian uses its own Markdown extensions, and another app may use a different Markdown flavor.
For a connected note workflow, see the Obsidian linking guide and the Obsidian Markdown cheat sheet. If you need a full system for daily planning, projects, and reviews, Obsibrain’s quick-capture workflow shows the product path after the file-opening problem is solved.
Why does an MD file show raw symbols?
Raw symbols are normal when the app reads the file as plain text. Markdown is not a binary document with a required viewer. It is text that a renderer can interpret.
For example:
## Meeting notes
- [ ] Send the proposal
A source editor shows the ##, - [ ], and words. A renderer shows a heading and a checkbox. If you need the source, raw text is the expected result. If you need the formatted view, open the file in a Markdown preview.
Common MD file problems
The file opens in the wrong app
Change the .md association in Windows Default apps or macOS Finder’s Get Info → Open with panel. Set the default only after you confirm that the selected app supports the way you want to use Markdown.
The file name is really file.md.txt
Some systems hide known file extensions. Turn on full file-name extensions, then check the complete name. Rename a copy if you need to correct the extension. Do not remove an extension from the only copy until you confirm the original is backed up.
The file looks garbled
Try an editor that lets you choose the encoding and start with UTF-8. Keep the original file before converting it. A delivery or export process can change the encoding even when the Markdown syntax is valid.
Tables, checklists, or diagrams do not render
Markdown flavors differ. CommonMark is a useful baseline, while GitHub, Obsidian, and other tools add their own extensions. Check the file in the renderer that your readers will use. For Obsidian-specific syntax, use the official Markdown formatting documentation.
A README looks different locally and on GitHub
A README can rely on repository-relative links, images, badges, HTML, or GitHub Flavored Markdown. A local preview can confirm the syntax, but only the target repository can confirm its final paths and context. Review both before sharing the file.
An Obsidian file does not open as expected
Confirm that the file is inside the intended vault and that its name ends in .md with no extra characters. Obsidian’s import documentation describes moving or dragging Markdown files into a vault. A file association alone does not replace that import step.
Can you convert an MD file to PDF or Word?
Yes. Use the export or print feature in a Markdown editor that supports the target format. Preview the result before sharing it because tables, images, task lists, and custom extensions can change during conversion.
Keep the original .md file as the editable source. Export PDF or DOCX when the recipient needs a fixed or broadly compatible document.
Safe opening checklist
Use this checklist when someone sends you an unfamiliar .md file:
- Confirm the complete file name ends in
.md. - Open a copy when the source is untrusted or important.
- Use a text editor to inspect the source before rendering it.
- Use a local viewer for private notes.
- Check the renderer’s support for HTML, images, scripts, and diagrams.
- Compare a README with its target repository before publishing it.
- Import files into an Obsidian vault only when you want vault features.
The shortest answer is: use Notepad or TextEdit for raw Markdown, VS Code or another Markdown editor for a rendered preview, and Obsidian when the file belongs in a connected local vault. Choose Obsibrain when you want that vault to include a ready-made layer for capture, tasks, projects, and reviews.
Obsibrain
Get the complete Obsidian second-brain system
Skip the 20-hour setup spiral. Templates, dashboards, and workflows ready in about 30 minutes — no coding required.
$49 one-time payment. Backed by our 30-day guarantee.

