Skip to content

How to open .md files on Windows 10 and 11

By Kunal Sahu · Last updated

Short answer: a .md file is plain text, so Notepad opens it, but you'll see raw symbols like # and **. To read it formatted, with headings, tables, code and diagrams, open it in a Markdown viewer and make that viewer the default app for .md files.

What is a .md file?

A .md (or .markdown) file is a text document written in Markdown, a lightweight syntax where # starts a heading, - starts a list item and triple backticks fence a block of code. READMEs, changelogs, documentation and almost everything AI coding agents write (plans, specs, CLAUDE.md, AGENTS.md) are Markdown. The file itself is just UTF-8 text; the formatting only appears when a program renders it.

Four ways to open a .md file on Windows

1. Notepad (built in, raw text)

Right-click the file, choose Open with and pick Notepad. You'll see everything, but as source. Recent Windows 11 versions of Notepad add lightweight formatting that understands basic Markdown such as headings, bold and lists. It doesn't draw Mermaid diagrams or highlight code blocks.

2. Visual Studio Code (preview pane)

Open the file in VS Code and press Ctrl+Shift+V for a preview, or Ctrl+K then V to show it side by side. The preview is good and updates as the file changes. Mermaid diagrams need an extension, and it's a full editor to launch just to read one document.

3. PowerToys preview in File Explorer

Microsoft's free PowerToys File Explorer add-ons include a Markdown previewer. Turn it on, select a .md file in Explorer and press Alt+P to show the preview pane. It's handy for a glance, but it lives in a narrow pane and is a preview rather than a reading app.

4. A dedicated Markdown viewer

A viewer like MD Reader opens on double-click, renders the whole document (Mermaid diagrams, tables, task lists, highlighted code), follows your light or dark theme and reloads live when the file changes, which matters when an AI agent is still writing it. It works offline.

Which option should you use?

NeedNotepadVS CodePowerToysMD Reader
Rendered headings, lists, tablesBasicYesYesYes
Mermaid diagramsNoWith extensionNot built inYes
Live reload while a file is writtenNoYesNoYes, keeps scroll position
Opens on double-click as a readerYesHeavyExplorer pane onlyYes
PriceFreeFreeFreeOne-time purchase

If you only open a README now and then, the free options are fine. If you read long, diagram-heavy files every day, a dedicated viewer saves the most time.

Make .md files always open in your viewer

  1. Right-click any .md file in File Explorer and choose Open with → Choose another app.
  2. Select your Markdown viewer. If it isn't listed, choose Choose an app on your PC and browse to it.
  3. Click Always (Windows 11) or tick Always use this app to open .md files (Windows 10).

You can also set it in Settings → Apps → Default apps: search for .md under file types and pick the app. Repeat for .markdown if you use that extension.

Open .md files from the command line

If you live in a terminal next to an AI agent, these work in PowerShell, Windows Terminal and Command Prompt:

CommandWhat it does
start README.mdOpens the file in your default app for .md (cmd and PowerShell)
ii README.mdPowerShell shorthand for Invoke-Item, same result
notepad README.mdForces Notepad, handy for a quick raw edit
code README.mdOpens it in VS Code, if VS Code is on your PATH

Once a viewer is your default, start docs\plan.md is the fastest way to pop an agent's plan into a readable window.

What about .mdx, .mdc and .markdown?

  • .markdown is the same format as .md with a longer extension. Set the same default app for it.
  • .mdx mixes Markdown with JSX components for documentation sites. Viewers show the Markdown parts; the components only render inside the site's build.
  • .mdc is used by Cursor for project rules. It's Markdown with a small metadata header, so it reads fine in any Markdown viewer once you open it with one.

Troubleshooting

The file is called readme.md.txt

Windows hides known extensions by default, so a file saved by Notepad may secretly end in .txt. In File Explorer turn on View → Show → File name extensions (Windows 11) or tick File name extensions on the View tab (Windows 10), then rename it.

Characters look garbled

Markdown should be saved as UTF-8. Agents and editors almost always do this; if a file came from elsewhere, re-save it as UTF-8 from VS Code (the encoding is shown in the status bar).

Diagrams show up as code

A block starting with ```mermaid is a Mermaid diagram. It only becomes a picture in an app that runs Mermaid. See our Mermaid viewer for Windows guide.