Articles
Published · November 18, 2026

The text/markdown Media Type: What RFC 7763 Actually Registers

RFC 7763 registers text/markdown. The charset parameter is required, the variant parameter is only a hint, and the RFC does not standardize Markdown's syntax at all.

Also in: Español中文हिन्दी

The MIME type for Markdown is text/markdown, registered in RFC 7763 in March 2016. It has a required charset parameter, an optional variant parameter, and no say over what Markdown syntax actually means.

That last point surprises people. The registration is a label, not a specification. Here's what the RFC fixes, what it leaves open, and how to use it.

What RFC 7763 is, and what it is not

RFC 7763 is an Informational RFC by Sean Leonard, not a Standards Track document. Its abstract describes Markdown as "a family of plain-text formatting syntaxes that optionally can be converted to formal markup languages such as HTML." It registers a media type and parameters that indicate the author's intent on how to interpret the content.

It doesn't define the syntax. For that, it points at Daring Fireball's Markdown Syntax Documentation. John Gruber's Markdown page says Markdown is both a plain text formatting syntax and a Perl tool that converts it to HTML, with an overriding goal of being as readable as possible. Its download line reads Markdown 1.0.1, 17 Dec 2004. Everything since then is a variant. For the story of how the specs grew, see how Markdown got a spec.

The RFC says the main use case is the split-screen or live-preview editor, and it marks the intended usage as COMMON.

The charset parameter is required

Under the registration template, charset is required, and there is no default. The reason is practical. The original syntax description, and many implementations at the time, never said which character encoding to assume. Many processors only care about US-ASCII punctuation, so the bytes outside it were left to whoever wrote the file.

A correct header looks like this:

Content-Type: text/markdown; charset=UTF-8

Any octet sequence is valid as long as it conforms to the declared charset. If a receiver guesses wrong, you get garbled text. That's a separate problem, covered in how to fix encoding problems.

The variant parameter is a hint, not a contract

The optional variant parameter names the Markdown flavor the author intended. The RFC is careful about its weight: the recipient "MAY interpret the Markdown as that variant, but is under no obligation to do so." Leave it out and there is simply no hint. The value is US-ASCII and case-insensitive, and a receiver that does not recognize it may show the identifier to the user.

Content-Type: text/markdown; charset=UTF-8; variant=Original

Original is the one variant registered in RFC 7763 itself, described as Gruber's original Markdown syntax. The registry is First Come First Served, identifiers must start with a letter and end with an alphanumeric character, and Standard, Common and Markdown are reserved.

The interoperability advice is blunt: variants are broadly compatible with humans but not necessarily with each other. Receivers should only accept variants they explicitly know about, and senders should avoid variants the recipient is not known to understand. That is the same trade-off behind CommonMark vs GitHub Flavored Markdown.

Variants registered in RFC 7764

The companion document, RFC 7764, registers eight variants in the Markdown Variants registry:

  • MultiMarkdown
  • GFM (GitHub Flavored Markdown)
  • pandoc
  • Fountain
  • CommonMark
  • kramdown-rfc2629
  • rfc7328 (Pandoc2rfc)
  • Extra (PHP Markdown Extra)

RFC 7764 admits there's "no governing body" for Markdown. Its stated aim is one media type that accommodates diversity, because registering hundreds of distinct types would hurt interoperability. Some variants add their own parameters: MultiMarkdown has options, and pandoc has extensions. The CommonMark registration always refers to the latest version, or an unspecified version at the receiver's choice, so it does not pin a spec revision.

RFC 7764 also suggests recording the variant in a filename as a prefix to the extension, for example example.pandoc.markdown.

Fragment identifiers, extensions and security

text/markdown itself defines one fragment parameter, line, with the meaning from RFC 5147 and zero-based counting. So #line=10 points at the eleventh line, not the tenth. Pandoc and Markdown Extra add {#id .class} identifiers for headings and similar elements.

The template lists the extensions .md and .markdown, with no magic number. Choosing between them is mostly habit; see .md vs .markdown vs .txt.

Plain Markdown is relatively harmless on the security side, though Unicode control characters can change text direction. Markdown rendered to HTML inherits the issues of HTML, so the RFC recommends sanitizing the output markup rather than the Markdown.

What to do in practice

Serve Markdown as text/markdown; charset=UTF-8, and add variant= only when the flavor matters to the reader. Then assume the receiver may ignore it anyway. If a file depends on tables, footnotes or task lists, say so in the document or its name, because the media type cannot guarantee anything about rendering.

Where Carets fits

Carets is a native notes and code editor for iPhone, iPad and Mac. You write Markdown and plain text, organized into files, projects and tags, and your notes stay portable .md files that any tool reading text/markdown can open. Download Carets on the App Store.

Frequently Asked Questions

What is the MIME type for Markdown?

It is text/markdown, registered in RFC 7763 in March 2016. The charset parameter is required and variant is an optional hint.

Is text/markdown an official Markdown standard?

No. RFC 7763 is Informational. It registers a media type and parameters but does not define the syntax, and RFC 7764 notes that Markdown has no governing body.

Does the variant parameter change how a file is rendered?

Not necessarily. The recipient may interpret the content as that variant but is under no obligation to.

What file extensions does RFC 7763 list?

.md and .markdown. It lists no magic number.