Skip to content

Markdown to HTML

Convert Markdown to clean, semantic HTML

Paste Markdown and download a sanitized, standards-compliant HTML file. Supports GitHub Flavored Markdown, code highlighting, and works entirely in your browser.

  • Sanitized HTML output — safe to paste into any CMS
  • Highlight.js-powered code blocks for 150+ languages
  • Standalone HTML download with embedded styles
  • No upload — your Markdown never leaves your browser

Live sample

Output preview

This is Markdown converted to HTML.

  • Headings →

  • Bold
  • Italic
  • Code
<p>Hello <strong>world</strong>!</p>

How to convert Markdown to HTML

  1. Open the editor and paste your Markdown.
  2. Click Export → Export HTML in the toolbar.
  3. A self-contained HTML file downloads with embedded styles — ready to paste into any site or CMS.

What gets converted

MarkdownHTML element
# Heading<h1>…</h1>
**bold**<strong>…</strong>
_italic_<em>…</em>
[text](url)<a href="url">text</a>
![alt](url)<img src="url" alt="…">
> quote<blockquote>…</blockquote>
- bullet<ul><li>…</li></ul>
\`` lang ``` `<pre><code class="language-lang">…

Safe by default

We sanitize the rendered HTML using rehype-sanitize with a careful allowlist of attributes — no inline event handlers, no javascript: URLs, no surprises. The HTML you download is safe to embed in your own pages or to ship as a static file.

Need to do it programmatically?

If you're a developer who needs to do this in code, the pipeline that powers this tool is:

import { unified } from "unified";
import remarkParse from "remark-parse";
import remarkGfm from "remark-gfm";
import remarkRehype from "remark-rehype";
import rehypeSanitize from "rehype-sanitize";
import rehypeHighlight from "rehype-highlight";
import rehypeStringify from "rehype-stringify";

const html = String(
  await unified()
    .use(remarkParse)
    .use(remarkGfm)
    .use(remarkRehype)
    .use(rehypeSanitize)
    .use(rehypeHighlight)
    .use(rehypeStringify)
    .process(markdown)
);

Frequently asked questions

Is the converted HTML safe?
Yes. The output is sanitized with rehype-sanitize using an allowlist. Inline event handlers and javascript: URLs are stripped.
Do you upload my Markdown to a server?
No. The conversion happens entirely in your browser, so your content never leaves your device.
Does the downloaded HTML include styles?
Yes. The HTML file embeds a minimal stylesheet so it renders nicely when opened directly or pasted into a CMS.
Can I convert GFM tables and task lists?
Yes. Tables, task lists, strikethrough, autolinks, and footnotes are all supported via the GitHub Flavored Markdown extension.