What Is a .MD File? (.md, .markdown)
A .md file is a Markdown document: plain text with lightweight formatting marks such as # for headings, **bold**, - for bullet lists and [text](url) for links. It reads naturally as text and converts cleanly to HTML, which is why Markdown is the standard file extension for README files, documentation and notes apps.
- Extension
- .md, .markdown
- Full name
- Markdown Document
- Type
- Document file
- MIME type
- text/markdown
- Developed by
- John Gruber, with Aaron Swartz (2004)
About Markdown files
The Markdown file extension is usually .md, with .markdown as a longer equivalent. Because the file is plain UTF-8 text, it opens in any text editor, diffs cleanly in Git, and never locks you into a particular app. Formatting only appears when software renders it, for example on GitHub, in VS Code's preview, or in notes apps like Obsidian.
There are several flavours. The original 2004 syntax was ambiguous in places, so CommonMark defined a precise specification, and GitHub Flavored Markdown adds tables, task lists, strikethrough and automatic links. Most tools follow CommonMark plus some GFM extensions, so simple documents render the same almost everywhere while tables and footnotes may vary.
Windows 11 Notepad now renders basic Markdown formatting for .md files, including headings, lists, bold and links, with a toggle to switch back to raw syntax. Markdown files are tiny and carry no macros; the only risk is embedded HTML or links when a site renders untrusted Markdown, which is the renderer's job to sanitize.
What Markdown files are used for
- README.md files in code repositories
- Technical documentation and static websites
- Personal notes in apps like Obsidian
- Writing for blogs, chat apps and forums that accept Markdown
- Prompts and documents exchanged with AI tools
How to open a .md file
Windows
Open it in Notepad, which renders basic Markdown formatting in current Windows 11 versions, or in VS Code, whose preview (Ctrl+Shift+V) shows the fully rendered document.
Mac
TextEdit shows the raw text; VS Code and Markdown editors such as Obsidian show it formatted.
iPhone and iPad
The Files app shows the plain text; a Markdown app such as Obsidian renders it.
Android
Files by Google shows the text; Markdown editor apps render it.
Online / any browser
Upload it to a GitHub repository or Gist to see it rendered, or paste it into any online Markdown previewer.
How to convert a .md file
Pandoc converts Markdown to Word, PDF, HTML, EPUB and more from the command line, for example pandoc notes.md -o notes.docx.
In Google Docs, File > Download > Markdown (.md) exports a document to Markdown, and with Markdown enabled under Tools > Preferences, Docs can also paste Markdown as formatted text.
Renaming .txt to .md is fine because both are plain text; renaming .md to .docx or .pdf does not convert it.
Changing the extension in the file name does not convert the file. See how to change a file extension for when renaming is safe.
Naming and renaming Markdown files
- Use README.md, CHANGELOG.md and CONTRIBUTING.md in uppercase at the root of a repository; GitHub and other hosts detect and display those names automatically.
- For notes and docs, use lowercase, hyphenated names like getting-started.md, because they often become URLs in documentation sites.
- Prefix posts or journal entries with an ISO date, for example 2026-03-14-release-notes.md, which many static site generators expect.
Renaming lots of .md files? See how to rename markdown files with ai, use the free online bulk renamer for patterns and numbering, or try File Renamer AI to name each file from what is inside it.
Related file types
A .txt file is a plain text file: just characters, with no fonts, bold, images or layout. It is the simplest and most portable document format, readable by every operating system and text editor, and used for notes, logs, README files, configuration and data that needs to stay readable for decades.
A .html or .htm file is a web page written in HyperText Markup Language. It is plain text with tags that describe headings, paragraphs, links, images and forms, which a web browser renders as a formatted page. Double-clicking an HTML file opens it in your default browser; any text editor can edit it.
A .docx file is a Microsoft Word document saved in the Office Open XML format used by Word 2007 and later. It stores text, formatting, images, tables, comments and tracked changes in a compressed ZIP package, and it is the default format for editable documents in Word, Google Docs exports and most office suites.
A .pdf file is a Portable Document Format document: a fixed-layout file that looks the same on every device, with its text, fonts, images and page geometry packed inside. It is the standard format for sharing finished documents such as invoices, contracts, forms, manuals and scanned paperwork that should not reflow.
Frequently Asked Questions
What is the file extension for Markdown?
Markdown files use .md, and sometimes the longer .markdown. Both are plain text and work the same way.
How do I open a .md file on Windows?
Open it in Notepad, which shows basic Markdown formatting in current Windows 11, or in VS Code and press Ctrl+Shift+V for a full preview.
What is the difference between .md and .txt?
Both are plain text, but .md tells software to interpret Markdown syntax such as # headings and **bold** as formatting.
How do I convert Markdown to Word or PDF?
Use Pandoc, or open the file in a Markdown editor or VS Code extension that exports to .docx or PDF.