Skip to content

.MD file extension

To open .MD files on Windows, right-click the .md file → Open with → choose a text editor or Markdown editor (for example, Visual Studio Code).

To open a .md file, use a text editor (to view/edit the raw text) or a Markdown-capable app (to preview it with formatting). On most systems you can right-click the file and choose an editor such as Visual Studio Code, then use a Markdown preview if needed.

Last updated: June 10, 2026

Open on your device

Choose your operating system for a dedicated step-by-step opening guide.

How to open .MD files

Use these platform-specific instructions to open .MD files safely.

Windows

  1. Right-click the .md file → Open with → choose a text editor or Markdown editor (for example, Visual Studio Code).
  2. If using Visual Studio Code, open the file and use the built-in Markdown preview to view formatted output (per VS Code Markdown documentation).
  3. If the file should always open in that app, use “Choose another app” and set it as the default for .md.
Full Windows guide

Mac

  1. Control-click the .md file → Open With → select a text editor or Markdown editor.
  2. If you need formatted viewing, open it in an editor that supports Markdown preview (for example, Visual Studio Code).
  3. To change the default, use Get Info → Open with → Change All.
Full Mac guide

Linux

  1. Right-click the .md file in your file manager → Open With → choose a text editor or Markdown-capable editor.
  2. If file associations are incorrect, check your desktop’s MIME/file association settings (many systems use freedesktop.org shared MIME info with globs like *.md).
  3. Use a Markdown preview feature in your chosen editor if you need rendered formatting.
Full Linux guide

iOS

  1. Open the .md file from the Files app; if it shows as plain text only, use Share → Open in an editor that supports Markdown viewing/editing.
  2. If you need reliable rendering, transfer the file to a desktop editor with Markdown preview (for example, Visual Studio Code).
Full iOS guide

Android

  1. Open the .md file from your file manager; if it opens as plain text, open it with a code/text editor app installed on your device.
  2. For consistent formatted preview, consider viewing on a desktop Markdown editor (for example, Visual Studio Code).
Full Android guide

Security notes

  • Markdown is plain text, but some viewers/renderers support embedded HTML; if a renderer allows HTML, opening untrusted .md in a web context can raise risks like unwanted links or HTML-based injection depending on the viewer’s sanitization.
  • Be cautious with .md files that contain links you did not expect; Markdown makes links easy to disguise with readable link text.
  • Differences in Markdown variants and renderer behavior can produce unexpected output; preview untrusted Markdown in a trusted, well-maintained application and avoid publishing unreviewed rendered output.

Can't open this file?

These are the most common causes and fixes when .MD files fail to open.

Common reasons

  • The file opens as plain text (no formatting)
  • Rendering looks different in different apps
  • Wrong app is associated with .md
  • Text looks garbled or special characters are wrong

Fix steps

  1. Open the file in a Markdown-capable editor/viewer and enable its preview/rendered view (for example, VS Code Markdown preview).
  2. If sharing for viewing, consider converting/exporting to HTML or PDF using your Markdown tool (feature availability varies by app).

Recover a deleted or lost .MD file

If the file was deleted by mistake or the drive was formatted, data recovery software may be able to get it back. Stop writing to that drive right away, because new data can overwrite what you want to recover.

We may earn a commission when you use affiliate links. This supports our free file extension guides.

What is a .MD file?

.md is the common filename extension for Markdown, a lightweight markup language that uses plain text with simple syntax for headings, lists, links, and code blocks. The registered media type for Markdown is text/markdown (RFC 7763), and different “variants” of Markdown exist, with CommonMark being a widely used specification.

Background

Markdown is designed to be easy to read and write as plain text while also being easy to convert into structured formats like HTML. It is widely used for README files, documentation, technical notes, changelogs, and content in developer workflows.

Because Markdown is plain text, .md files are highly portable across operating systems and devices. Many editors can display the raw text, and many developer tools provide a rendered preview so you can see the formatted result.

Markdown has multiple dialects/variants (for example, CommonMark defines a formal spec). When a .md file renders “differently” in different apps, it’s often due to differences in which variant/features the app supports.

Common MIME types: text/markdown

Other meanings of .MD

The extension .MD is used by several programs. Besides the file type described on this page, it can also stand for:

  • SEGA Mega Drive ROM
  • MDCD Compressed Archive
  • MuseData Musical Score
  • Sharkport Saved Game File
  • Moneydance Financial Data File

Further reading

Authoritative resources for more details on the .MD format.

Common .MD issues

The file opens as plain text (no formatting)

Markdown is plain text; many apps only show the raw text and do not render headings, lists, and links as formatted content.

  1. Open the file in a Markdown-capable editor/viewer and enable its preview/rendered view (for example, VS Code Markdown preview).
  2. If sharing for viewing, consider converting/exporting to HTML or PDF using your Markdown tool (feature availability varies by app).

Rendering looks different in different apps

Markdown has variants/dialects, and different renderers support different features. A file written for one variant may render differently elsewhere.

  1. Check whether the file targets a specific variant; CommonMark is a widely used baseline specification.
  2. Avoid non-standard extensions where possible, or test the file in the renderer your audience will use.

Wrong app is associated with .md

The operating system may associate .md with an unexpected program, causing confusing open behavior.

  1. Change the default app for .md files using your OS “Open with” / “Get Info” default app settings.
  2. On Linux desktops, verify MIME associations (freedesktop.org shared MIME info commonly maps *.md).

Text looks garbled or special characters are wrong

Markdown files are text, and problems can occur if an app assumes the wrong character encoding. RFC 7763 also defines charset handling for text/markdown in MIME contexts.

  1. Open the file in an editor that lets you choose the text encoding and try UTF-8.
  2. If the file was delivered via email/web, ensure the correct charset is used for text/markdown in that system.

FAQ

What is a .md file used for?

It is typically a Markdown document used for documentation and notes (for example, README files), written as plain text but often rendered as formatted content.

What is the MIME type for .md (Markdown)?

The registered media type is text/markdown, as defined in RFC 7763 and listed in the IANA Media Types Registry.

Why does my .md file look different on GitHub/another site than in my editor?

Different platforms may use different Markdown variants and extensions. Using CommonMark-compatible syntax improves consistency, but renderers can still differ.

Can I convert a document to Markdown by renaming the extension to .md?

No. Renaming only changes the filename; it does not convert the content. Use a proper export or conversion tool to produce real Markdown text.

Similar file extensions

Compare related formats in the same category to find the right tool faster.

Did this guide help?