Skip to main content

HTML to Markdown

Convert HTML to Markdown in your browser. Headings, lists, tables, links, images, and code blocks. The HTML is parsed inertly and never rendered, and unsafe link schemes are dropped.

Ctrl+Enter to Convert

What this tool does

Paste HTML and get Markdown. Headings, paragraphs, bold and italic, links, images, ordered and unordered lists including nested ones, blockquotes, tables, inline code, and code blocks are all converted. Text that would otherwise be read as Markdown syntax is escaped, so the output means what the original said.

What gets converted

  • Headings h1–h6
  • Paragraphs and line breaks
  • Bold, italic, strikethrough
  • Links and images
  • Ordered, unordered, and nested lists
  • Blockquotes
  • Inline code and code blocks
  • Tables
  • Horizontal rules

Characters that mean something in Markdown are escaped when they appear in ordinary text, so a sentence containing an asterisk or a bracket survives the round trip. Inside code spans and code blocks nothing is escaped, because there the characters are already literal.

What does not survive

Markdown is a smaller language than HTML, so some things have nowhere to go. Rather than approximating them, they are dropped:

  • Styling — colours, fonts, and alignment have no Markdown equivalent and are dropped
  • Scripts, stylesheets, iframes, SVG, and canvas, which are not prose
  • Form controls, and the layout structure of divs and spans
  • Attributes such as id and class

Malformed HTML is not rejected. It is parsed the way a browser parses it — an unclosed <b> is closed for you — so pasting a fragment copied out of the middle of a page generally works.

How the HTML is handled

The HTML you paste is never inserted into this page. It is parsed into a detached document, which does not run scripts, does not fire event handlers, and does not fetch images or stylesheets. Markdown is text, and the result is only ever shown as text.

Link and image destinations are checked before they are kept. http, https, mailto, tel, ftp, and ordinary relative paths are preserved. Anything else — javascript:, data:, vbscript:, file: — has its destination removed while the visible text stays, and the tool tells you it happened rather than doing it quietly.

Privacy

The HTML is parsed and converted locally in your browser. Nothing is uploaded, stored on our servers, or tracked — and the page you paste from is never fetched.

Use cases

  • Turn a page or an email you have copied into Markdown for notes or a README
  • Move content out of a CMS or a rich-text editor into a Markdown file
  • Recover Markdown from HTML that was generated from Markdown in the first place

Related tools

To strip Markdown down to readable prose instead, use Markdown to Plain Text. If you only need the tables out of a document, Markdown Table ↔ CSV converts between Markdown tables and CSV.

Missing an element you need? Suggest a feature →