DEV Community

Cover image for How to open a .md file and read it like a page
Ilya Letunov
Ilya Letunov

Posted on Edited on

How to open a .md file and read it like a page

Someone sends you notes.md, or an AI assistant hands back a plan as Markdown. You double-click it and get a wall of #, ** and pipes. The file is fine; you just opened it in something that shows the source instead of rendering it.

Here are the ways to read it as a page, from the ones already on your machine to the ones that work on any computer.

If you have a code editor

VS Code renders Markdown out of the box. Open the file and press Ctrl+Shift+V (Cmd+Shift+V on a Mac) for a preview tab, or Ctrl+K V to see source and preview side by side. Most other editors (Zed, Sublime with a plugin, JetBrains IDEs) have the same thing under a slightly different shortcut.

This is the best option when you also want to edit the file and keep it on disk.

If the file lives on GitHub

Push it to a repository, or paste it into a gist, and GitHub renders it: headings, tables, task lists, code blocks with highlighting. Good for documentation that already belongs in a repo, less good for a one-off file you do not want to commit anywhere.

If you are on someone else's computer, or just want it now

An online viewer is the fastest route: no install, no repo. Drop the file in and read it.

One that works without an account is Birta's Markdown viewer. Drop a .md file or paste the text, and it renders headings, lists, tables, task lists, strikethrough and footnotes. A few things it does that matter in practice:

  • Nothing is uploaded while you read. The file is rendered in your browser; it leaves your machine only if you ask for a link.
  • Edit in place. Switch to the Markdown view, fix a typo, and the page updates as you type.
  • Phone-width view. Handy when the file is going to be read on a phone, where wide tables are the first thing to break.
  • Send it as a page. If someone else needs to read it, get a link that opens for 24 hours for anyone, with no account on their side. The recipient sees the rendered page, not the source.

Which one to use

Situation Use
You will keep editing the file your editor's preview
It is project documentation the repo on GitHub
You need to read it right now, anywhere an online viewer
Someone else has to read it, and they are not technical a rendered page sent as a link

The last row is the one that trips people up. Sending a .md attachment to a colleague who does not live in a code editor means they open it in Notepad and see the same wall of symbols you started with. Send the rendered page instead.

Top comments (0)