Back to blog

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.

What Is an MD File? How to Open .MD Files on Windows, Mac & Mobile

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 sourceNotepad, TextEdit, or another text editorMarkdown characters such as #, **, and backticks
Preview formatted MarkdownVS Code, Obsidian, Typora, or another Markdown viewerRendered headings, links, lists, and code
Work on a READMEA local preview, then the target Git platformLocal rendering first, repository context second
Build a note systemAn Obsidian vaultLocal .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

  1. Right-click the .md file.
  2. Select Open with.
  3. 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

  1. Open the file in Visual Studio Code.
  2. Press Ctrl+Shift+V to open the Markdown preview.
  3. 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:

  1. Open Settings → Apps → Default apps.
  2. Search for .md.
  3. Select the current app.
  4. 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

  1. Control-click the .md file in Finder.
  2. Select Open With → TextEdit.
  3. 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:

  1. Select an .md file in Finder.
  2. Choose File → Get Info.
  3. Expand Open with.
  4. Choose an app.
  5. 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:

  1. Save the file to the device’s Files or file-manager area.
  2. Use Share or Open with to send it to a Markdown-capable app.
  3. Use a preview mode when you only need to read the file.
  4. 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:

SituationBetter starting point
You received one file and only need to read itA local Markdown preview or text editor
You maintain README files and technical docsVS Code or another code editor
You want links, search, daily notes, and projectsAn Obsidian vault
You want a ready-made system for notes and executionObsibrain

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.