Skip to content
Devtools 360

Convert Markdown to HTML

Write or paste Markdown and get the matching HTML instantly, with a rendered preview beside it. Output is sanitised, so it is safe to paste into a CMS, email template or static page.

Runs in your browserFree · No sign-up

How to convert Markdown to HTML

  1. Type or paste Markdown into the left box, or load the sample.
  2. Check the rendered Preview, or switch to HTML source to see the generated markup.
  3. Optionally wrap the output in a complete HTML document.
  4. Copy the HTML or download it as an .html file.

Supported formats

Input
Markdown (GFM)
Output
HTML, .html file

What is sanitised and why

Markdown allows raw HTML, which means a pasted README could contain scripts, inline styles or iframes. Before anything is shown or copied, the HTML passes through DOMPurify: script, style, iframe and form elements are removed, event-handler attributes such as onclick are stripped, and links are limited to http, https, mailto and relative URLs. External links get rel="noopener noreferrer". GitHub-flavoured extras — tables, task lists, strikethrough and fenced code blocks — are supported. To count the words in your document, use the Word Counter.

Benefits

  • GitHub-flavoured Markdown: tables, task lists, strikethrough and autolinks.
  • Sanitised output that is safe to embed elsewhere.
  • Side-by-side live preview while you type.

Limitations

  • Syntax highlighting, footnotes, math and Mermaid diagrams are not rendered.
  • Images referenced by URL are loaded from their servers when previewed, which reveals your IP address to those servers.
  • Inline styles and embedded HTML widgets are removed by sanitisation.

Privacy and security

Markdown is converted in your browser with the marked and DOMPurify libraries, which are downloaded on first use. Your text is never uploaded. Only images you reference by URL are fetched, directly from their own servers.

Read our privacy policy for details about the site as a whole.

Frequently asked questions

Which Markdown flavour is supported?

GitHub-flavoured Markdown (GFM), the variant used on GitHub and most documentation sites, including tables and task lists.

Why did my <script> or <iframe> disappear?

They are removed on purpose so the HTML is safe to paste elsewhere. Embedding scripts through Markdown is a common way to inject malicious code.

Can I get a complete HTML page?

Yes. Tick "Wrap in a complete HTML document" to add the doctype, head and body, or use Download .html, which always produces a full page.