What is a .md file?

You've been sent a .md file, or found one in a download, and it opens as a wall of symbols. Here's what it is and the fastest ways to read it.

All the tools

In short

A .md file is a plain-text document written in Markdown, a formatting syntax that uses characters like # for headings and ** for bold. Windows and macOS open it as raw text because they have no Markdown renderer; to read it formatted, drop it into a browser-based Markdown viewer, or open it in VS Code, Obsidian or on GitHub. It is safe to open and can be converted to PDF or Word in seconds.

At a glance
File typePlain text, UTF-8, using Markdown syntax
Extension variants.md, .markdown, .mdown, .mkd
Typical sizeA few kilobytes; a book-length document is under a megabyte
Opens inAny text editor (raw), or a Markdown viewer / editor (formatted)
Common sourcesGitHub READMEs, Obsidian notes, Notion exports, AI assistant answers
Convert toPDF, Word, HTML or plain text with the converters on this site
Safe to openYes — plain text cannot execute; viewers sanitise any embedded HTML

What a .md file contains

A .md file is plain text. Open it in any text editor and you will see ordinary words with a few formatting characters mixed in: # before headings, ** around bold text, - before bullet points, and | between table cells. Those characters are Markdown, a lightweight formatting syntax designed so the raw file stays readable even without a renderer.

Because it is plain text, a .md file is tiny, opens anywhere, works with version control, and will still be readable in decades. That is why it has become the default for software documentation, note-taking apps and, more recently, the answers written by AI assistants.

Where .md files come from

SourceWhat the file usually is
GitHub, GitLab, any code repositoryREADME.md, CHANGELOG.md, CONTRIBUTING.md — project documentation
Obsidian, Logseq, Bear, Joplin, iA WriterYour notes; each note is one .md file in a folder
Notion, Google Docs (export)Documents exported as Markdown for use elsewhere
ChatGPT, Claude, GeminiAnswers saved or downloaded as Markdown
Static site generators (Hugo, Jekyll, Astro)Blog posts and pages before they are built into HTML
Developer tools and CLIsGenerated reports, logs and help text

Why it opens as raw text on your computer

Neither Windows nor macOS ships a Markdown renderer. Windows hands .md to Notepad; macOS hands it to TextEdit. Both show the file exactly as stored, formatting characters and all, because to the operating system it is a text file like any other. Nothing is wrong with the file — it simply needs software that understands the syntax.

How to open a .md file

MethodBest forHow
Browser viewer (this site)Reading a file someone sent you, onceDrop it into the Markdown viewer; nothing is uploaded
VS CodeEditing, especially for developersOpen the file, press Ctrl/Cmd+Shift+V for a preview
ObsidianOngoing notes and linked documentsPut the file in a vault folder
Typora, MarkText, iA WriterA clean writing appOpen the file directly
GitHubFiles already in a repositoryGitHub renders .md automatically
Notepad / TextEditSeeing or editing the raw textWorks, but shows the syntax rather than the formatting

How to convert a .md file to something else

If the person you are sending it to does not use Markdown, convert it first. The Markdown to PDF converter produces a file anyone can open and print; the Markdown to Word converter produces a .docx they can edit and comment on. Both run in the browser and preserve headings, lists, tables, links and code blocks.

How to create a .md file

Any text editor will do: write the content, add the formatting characters, and save with a .md extension. For a live preview while you write, use the Markdown editor, and keep the Markdown cheat sheet open for the syntax.

Is a .md file safe to open?

Yes. A .md file is plain text and cannot contain executable code. The one caution is that Markdown allows raw HTML, so a file from an untrusted source could include a script tag; reputable viewers, including the one on this site, sanitise HTML before rendering it.

Questions people ask

What program opens .md files?

Any text editor opens them as raw text. To see the formatting, use a Markdown viewer in the browser, VS Code's preview, Obsidian, Typora, or GitHub.

Can I open a .md file on my phone?

Yes — open the viewer on this site and choose the file from your files app, or paste the text in. Obsidian and Bear also have mobile apps.

How do I change a .md file to a Word document?

Open it in the Markdown to Word converter and download the .docx. Headings, lists, tables and links are preserved.

What is the difference between .md and .txt?

Both are plain text. A .md file uses Markdown formatting characters that a renderer can turn into headings, bold, lists and tables; a .txt file has no such convention.

Is .md the same as .markdown?

Yes. .md is simply the short form; .markdown, .mdown and .mkd are also used and all contain the same kind of content.

Why does my README.md look different on GitHub than in Notepad?

GitHub renders the Markdown; Notepad shows the raw text. The file is the same — only the viewer differs.