FILE FORMAT GUIDE

MD File: Read Source and Preview Markdown

An MD file commonly contains Markdown text. Open it in a text editor to read or change the source, then use a Markdown preview to see headings, links and other formatting.

Markdown scope: This guide covers Markdown text. A .md name alone does not establish the format; if the file is binary or belongs to another application, follow that application’s documentation.

Quick facts

Extension
.md, .markdown
Format
Markdown Text
Category
document
MIME type
text/markdown
Standard / developer
John Gruber / IETF
Open with
Visual Studio Code

What is MD?

Markdown uses readable plain text and punctuation to describe document structure. A renderer interprets that source to produce a formatted view, often HTML. The MD file remains the editable source; its exact appearance depends on the Markdown variant and renderer.

How to open MD

Reading the source and rendering a preview are separate views of the same document.

Visual Studio CodeWindows / macOS / Linux

Open the MD source, then use Open Preview from the editor tab’s context menu. For a side-by-side view, run Markdown: Open Preview to the Side.

Common uses and compatibility

  • Write readable documentation using headings, lists, links and emphasis.
  • Edit Markdown source beside a rendered preview in VS Code.

Things to check

  • Markdown is a family of variants; a renderer may interpret extensions differently.
  • Relative image and link paths depend on where the Markdown document and companion files are located.

Technical details

Signature
No registered magic number
Encoding
Plain text; text/markdown requires a charset parameter and defines no default charset
Container
Not applicable
Compression
Not applicable

Markdown syntax and text/markdown registration

How to open and preview MD in VS Code

VS Code supports Markdown editing and preview without a separate Markdown extension.

  1. Open the MD file in VS Code to read its source.
  2. Right-click the editor tab and choose Open Preview, or use Ctrl+Shift+V on Windows/Linux and Shift+Command+V on macOS.
  3. For source and preview together, run Markdown: Open Preview to the Side from the Command Palette.
  4. Edit a copy, save it and check both the source and the rendered result.

Sources: Visual Studio Code: Markdown editing and preview

What do the punctuation marks mean?

Markdown syntax gives ordinary text a document structure. The following is an original small example; the source remains readable before rendering.

A heading, paragraph and list

# Packing checklist

Keep the **original** file.

- Read the source
- Check the preview

Sources: John Gruber: Markdown syntax

Why is an image missing or the layout different?

Keep relative image paths aligned with the document’s folder and move referenced assets together. If a preview differs from a publishing platform, check which Markdown variant that platform accepts before changing syntax. Do not assume every renderer supports the same extensions.

Sources: Visual Studio Code: Markdown editing and preview · IETF RFC 7763: text/markdown media type

Can I turn MD into PDF or HTML by renaming it?

A filename change does not render Markdown. Use a Markdown processor or the destination application’s supported export workflow to create another format, then inspect the result. Keep the MD and any linked assets as the editable source.

Sources: John Gruber: Markdown syntax

Does MD always mean UTF-8?

The text/markdown registration requires a charset parameter when used as a media type and defines no default charset. Preserve the file’s actual encoding; the suffix alone does not establish UTF-8.

Sources: IETF RFC 7763: text/markdown media type

Related formats

  • Portable Document Format

    Markdown is editable source; PDF is a separate rendered document format rather than a renamed MD file.

  • OpenDocument Text

    ODT is an office-document package, while Markdown stores source as plain text.

Sources & review

Sources reviewed 2026-11-06.