Guide

How to open .md files on Windows

A .md file is plain text written in Markdown. Any text editor opens it, but you only see the headings, tables, and diagrams as a formatted page in a program that renders Markdown. These are the common ways to do that on Windows, and what each one leaves out.

Your options

Four ways to read a Markdown file

Notepad

Notepad on Windows 11 can show Markdown with formatting and switch between the formatted view and the Markdown source, as Microsoft describes in its Notepad formatting announcement. That announcement lists bold, italic, links, lists, and headings; Mermaid diagrams are not among them. Notepad is an editor, so the file can be changed by accident.

Visual Studio Code

VS Code has a built-in Markdown preview: open the file and press Ctrl+Shift+V, or Ctrl+K V for the preview beside the source. Its Markdown documentation says the preview renders Mermaid diagrams. It is a full code editor, so reading one file means opening an editor first.

A browser extension

Markdown viewer extensions for Edge, Chrome, and Firefox render a .md file that you open in the browser. In Edge and Chrome the extension can read a file on your disk only after you turn on its access to file URLs in the extension's settings. Support for tables and Mermaid differs from one extension to the next.

A Markdown viewer such as LeanMark

LeanMark opens the file as a formatted, read-only page with GitHub-flavored Markdown tables, task lists, local images, and Mermaid diagrams rendered offline. It cannot edit, and it does not load remote images. The GitHub ZIP is unsigned; the Microsoft Store build is signed by Microsoft.

Files from AI tools

Markdown saved by ChatGPT, Claude, or a coding agent

Chat assistants and coding agents often hand you Markdown: a downloaded answer, a plan, or a README written into a project folder. Opening it in a viewer shows the tables and diagrams instead of the raw symbols.

Keep it open while it is written

When the file changes on disk, LeanMark refreshes the page and keeps your approximate reading position, so you can watch an agent's plan or report grow without reopening it.

Nothing in the file runs

Raw HTML in a document is not run, a strict Content Security Policy limits scripts, and remote images are not loaded. Links to websites open in your browser only after you click them.

Double-click to read

Make .md files open in your viewer

Right-click a .md file, choose Open with, then Choose another app, pick the program, and select Always. You can change it later under Settings, Apps, Default apps.

For LeanMark, the optional installer inside the GitHub ZIP adds it to Open With and to Default Apps for the current user. LeanMark opens .md, .markdown, .mdown, and .mkd files.

Measured

What LeanMark costs to open

Median of ten warm launches of LeanMark 0.3.0 with a simple document, counting LeanMark and every WebView2 process it starts.

Measured on Windows 11 Pro build 26200 with an Intel Core i7-13620H, 15.6 GiB of RAM, and WebView2 Runtime 153. Hardware, system state, and document complexity change the result. Linux and macOS are not measured, and no comparison with other programs is claimed.

Read the full measurement
74.15 ms
Native window visible, simple document, 0.3.0
96.79 MiB
Peak private memory, full process tree, 0.3.0

Install

Get LeanMark on Windows

With winget winget install abooodbah.LeanMark
From the Microsoft Store, with winget winget install --id 9MSS4WKJ22ZV --source msstore
With Chocolatey, from an administrator shell choco install leanmark -y
With Scoop, adding the Lean bucket first scoop bucket add lean https://github.com/abooodbah/scoop-bucket scoop install lean/leanmark

Builds for Linux and macOS are on the releases page. LeanMark is MIT licensed and free.