What is a .md file?
Plain text with a few punctuation conventions. It is the one format built to stay readable when nothing renders it — which is why it looks broken.
A .md file holds Markdown: ordinary text, plus a handful of punctuation conventions that
stand in for headings, emphasis, links and lists. Nothing else. No fonts, no page size, no
embedded pictures, no hidden structure. Open one in Notepad and you see the entire file,
because the entire file is what you see.
That last sentence is why so many people end up searching for this. Almost every other
extension you meet hides its contents behind an application. A .docx you cannot open is
visibly broken. A .md you open the wrong way is not broken at all — it just shows its
punctuation, and the punctuation looks like damage.
What is a .md file made of?
Seven or eight conventions carry almost everything anyone writes:
# A heading
## A smaller heading
Ordinary paragraph text, with **bold** and *italic*.
- a bullet
- another bullet
1. first
2. second
[a link](https://example.com)
> a quotation
`inline code`
Rendered, that becomes a document with real headings and real bullets. Unrendered, it is still perfectly legible — the hash marks read as “heading”, the hyphens read as “bullet”, and a reader who has never heard the word Markdown can follow it anyway.
Legible without a renderer, on purpose
John Gruber released Markdown in 2004, and the design goal he wrote down was that the
source should be publishable as-is. A Markdown document was meant to look like something
you had written, not like something you had marked up. Compare it to HTML, where
<strong>bold</strong> costs seventeen characters to say one word loudly, or to a
word processor file, which is a compressed archive of XML that means nothing to a human
eye.
So when the asterisks and hash marks show up on your screen, the format is doing exactly the job it was designed for. You are looking at the source, and the source was written to be worth looking at. Every other common document format would have shown you gibberish or refused to open.
What people usually want at that point is not a repair. They want the same text with the formatting applied — which is a display question, not a file question, and it is covered in how to open .md files.
Why the extension turned up everywhere
For its first decade Markdown belonged to bloggers and programmers. Then several things happened at once and the extension leaked into everyone’s downloads folder:
- GitHub renders
README.mdon the front page of every code repository, so every project on the site ships one. - Note-taking apps — Obsidian above all, plus Bear, Logseq and iA Writer — store each
note as a
.mdfile on disk rather than in a database. Export your notes and you get a folder of them. - Notion, Confluence and Slack all export to Markdown, because it is the only text format every destination can read back.
- Static site generators such as Hugo, Jekyll, Eleventy and Astro treat a folder of
.mdfiles as the content of a website. - Chatbots and AI assistants write in Markdown by default, so anything you save out of one arrives with hash marks and asterisks already in it.
None of those uses require you to know the syntax. That is rather the point: the file survives the trip between all of them because it carries no application-specific baggage.
There is no single Markdown
Gruber’s original description left real questions unanswered, and different projects answered them differently. Two names are worth knowing.
CommonMark is the careful re-specification, written to remove the ambiguities, and it is what most modern tools implement underneath.
GitHub Flavored Markdown, usually shortened to GFM, is CommonMark plus a few additions
that turned out to be too useful to leave out: tables, ~~strikethrough~~, task lists with
- [x], and bare URLs turning into links without any bracket syntax around them.
This is the honest explanation for the thing that confuses people most — a table that displays beautifully in one program and shows up as a row of pipe characters in another. Neither program is broken. One implements the table extension and the other does not.
Beyond those two there is a long tail of dialect-only features: footnotes as [^1],
definition lists, {#custom-id} after a heading, LaTeX math between dollar signs. Each
belongs to some particular tool, and each will sit there as literal text anywhere else.
Our own converters implement the CommonMark core plus the four GFM additions listed above,
and they say so out loud when they meet something from the long tail rather than dropping
it silently. You can watch that happen in the
Markdown editor or when you
turn Markdown into HTML.
What the format deliberately cannot do
Markdown has no page size, no margins, no fonts, no colors, no headers or footers, no comments and no revision history. It cannot hold an image — only a link to one. There is no way to say “this paragraph is 11pt Georgia”, and that is a feature rather than a gap: the appearance belongs to whatever renders the file, so the same note can look one way in your editor, another way on a website, and a third way in a printed handout.
When you do need a fixed appearance, the usual move is to convert. Turning a note into a PDF fixes the layout at that moment; going the other direction and pulling Markdown out of a web page throws the layout away again on purpose.
Is it safe to open one?
A .md file cannot run anything. It is text, so double-clicking one can only ever produce
text — the risk profile is that of a .txt, which is to say none. The one thing worth
knowing is that Markdown allows raw HTML inside it, so a document from a stranger can
contain a <script> tag as part of its content. A renderer either escapes that, displays
it, or strips it, and a careful one tells you which. Ours escapes it by default, meaning
the tag arrives on screen as visible text and never as running code.
- How to open .md filesIt opens in any text editor you already have, showing the asterisks and hashes. Here is how to see it formatted instead, without installing a thing.