Skip to content
hateitall

Markdown to HTML

Turn a README, post or note written in Markdown into tidy HTML you can paste into a page, with anything unsafe removed.

Processed locallyIn: Markdown, MD, TextOut: HTML

Loading tool…

How to use markdown to html

  1. Paste Markdown, open a .md file or load the sample.

  2. Choose whether raw HTML inside the Markdown is kept (and cleaned) or shown as text, and whether headings get anchor ids.

  3. Switch between the HTML source and a rendered preview.

  4. Copy the HTML or download it as a fragment or a full .html document.

What this tool does

  • Follows the CommonMark 0.31 spec, including lazy continuation lines, loose and tight lists, reference links and nested emphasis.
  • Adds the GitHub extensions people use most: pipe tables with alignment, task list checkboxes and ~~strikethrough~~.
  • Cleans the result with an allowlist: script, style and iframe elements, on* attributes and javascript: links are removed and listed.
  • Gives headings the same id anchors GitHub uses, so links like #install keep working.

How the result is verified

After converting, the finished HTML goes through the sanitizer a second time. The download is only enabled when that second pass finds nothing left to remove.

Frequently asked questions

Which Markdown flavour does it follow?

CommonMark, the specification GitHub, GitLab and most static site tools build on, plus GitHub's tables, task lists and strikethrough. All 652 examples in the CommonMark 0.31.2 spec produce the expected HTML.

Is the HTML safe to put on my site?

Only a fixed list of formatting elements and attributes survives. Scripts, event handlers, styles, forms, embedded frames and links using javascript: or data: are removed, and the tool shows what it took out.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Web page or HTML snippet to Markdown with lists, tables and code

HTML · HTM · Text→ MarkdownLight on device

A split Markdown editor and preview for README files, notes, documentation, and messages, processed locally.

Markdown · MD · TXT→ Markdown (.md)Light on device

Table of contents with GitHub-style heading anchors

Markdown · MD→ MarkdownLight on device

Consistent headings, bullets, emphasis and spacing, output unchanged

Markdown · MD→ MarkdownLight on device

Indent HTML neatly while keeping pre, textarea and script content intact

HTML · SVG→ HTMLLight on device