Skip to main content
Back to tools

Markdown to HTML

Convert Markdown to clean HTML markup

About Markdown to HTML

Converts Markdown to HTML as you type and places the markup in a read-only box with a Copy HTML button. It runs the same react-markdown and GitHub Flavored Markdown pipeline as the Markdown Preview tool, so the tags match what that preview renders. Useful for pasting content into CMS fields, email templates or static pages.

Category: Text.

Frequently asked questions

What Markdown syntax is supported?

▾

GitHub Flavored Markdown (GFM): headings, bold, italic, links, images, lists, blockquotes, fenced code blocks, tables with column alignment, task lists, strikethrough, autolinked URLs and footnotes. Code blocks get a language-* class, such as language-js, but no syntax highlighting.

Is the output sanitized?

▾

Raw HTML typed into the Markdown is escaped, so <div> comes out as the text &lt;div&gt; instead of a real tag. URLs that use protocols such as javascript: or data: are also stripped from links and images.

How do I add a class or ID to a heading in Markdown?

▾

This converter doesn't support attribute syntax such as {#id .class}: the braces stay in the heading text and headings get no automatic id. Add the attribute to the generated HTML by hand, or use a processor that supports it, such as Pandoc or markdown-it-attrs.

What does the HTML output look like?

▾

It's a fragment with no <html>, <head> or <body> wrapper and no stylesheet, with line breaks between most block elements and no indentation. The only classes and inline styles are the few that code blocks, task lists, footnotes and table alignment need, such as task-list-item or text-align.

Related tools