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

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.

More document file extensions · all file extensions