Skip to main content

HTML to Markdown Converter

Translate HTML to CommonMark Markdown with headings, lists, links, and images.

Written by Golam Rabbani, Founder & Lead Engineer

How to use this html to markdown converter

  1. Paste your HTML snippet or page into the input box.
  2. Press Convert to translate it to Markdown.
  3. Read the result panel — block elements become Markdown blocks; inline elements become inline Markdown syntax.
  4. Copy the Markdown into your editor or hit Reset to start over.

About this html to markdown converter

The HTML-to-Markdown converter walks your HTML into a token stream and emits Markdown that round-trips through any CommonMark renderer. Headings <h1>..<h6> become #..######, paragraphs become blank-line-separated blocks, <strong>/<b> become **text**, <em>/<i> become *text*, <code> becomes backticks, <pre> becomes a fenced code block, <blockquote> becomes a > prefix, <ul>/<ol> become - and 1. lists, <a href> becomes [text](url), and <img alt src> becomes ![alt](src). Unknown tags pass through as plain text so the document degrades gracefully.

Because the conversion happens entirely in your browser, you can paste content extracted from production CMS pages, customer support emails, or internal wikis without sending it anywhere. The output is plain Markdown, so it pastes cleanly into GitHub issues, Notion, Obsidian, and most static-site generators.

For example, the input "<h1>Hello</h1><p>This is <strong>bold</strong>.</p>" converts to: # Hello

This is **bold**.

Multiple paragraphs, nested lists, and links all preserve their structure on the way through.

FAQ

Which HTML elements are supported?
Headings, paragraphs, strong/em/code, pre/code blocks, blockquotes, ul/ol lists, links, images, and horizontal rules. Other tags pass through as their text content so the result stays readable.
Are HTML entities decoded?
Yes. Common named entities (&amp;, &lt;, &nbsp; and friends) and numeric character references decode back to their Unicode characters before the Markdown is emitted.
How are nested lists handled?
The converter tracks list depth and indents each nested level by two spaces, which matches the CommonMark indentation rule for sub-lists.
Will it strip styling like classes and inline CSS?
Yes. Markdown has no equivalent for class names or inline styles, so attributes other than href/src/alt are dropped intentionally.
Is my HTML uploaded?
No. Conversion happens entirely in your browser; nothing leaves your machine.
What if my HTML has bare text outside of tags?
Top-level text is treated as a paragraph. Whitespace is normalised so multiple spaces and newlines collapse into a single readable run.