Tools / HTML ↔ Markdown Converter

HTML ↔ Markdown Converter.

Convert HTML into clean Markdown, or render Markdown (CommonMark core plus GFM tables) into HTML.

Runs in your browser

Ctrl/⌘ + Enter to run · Ctrl/⌘ + Shift + C to copy the result

Result

About HTML ↔ Markdown Converter

The HTML ↔ Markdown Converter cleans up HTML into readable Markdown and renders Markdown back into HTML. From HTML it produces ATX headings, paragraphs, bold, italic and strikethrough, inline code with the right number of backticks, fenced code blocks that keep the language from a class such as language-bash, links with titles, images with alt text, nested bullet and numbered lists (including the start number), task-list checkboxes, block quotes, horizontal rules and GitHub tables with column alignment. Scripts, styles, forms and other non-content elements are dropped, whitespace is collapsed the way a browser would, and characters that would accidentally start Markdown syntax, such as a leading "1." or "#", are escaped. For example <p>Version <strong>2.0</strong></p> becomes Version **2.0**. This is handy for moving CMS content, emails or exported docs into a README or a static site. From Markdown it supports the CommonMark core: ATX and setext headings, emphasis, code spans, fenced and indented code, links, reference-style links, images, autolinks, nested and loose lists, block quotes, hard line breaks and raw HTML, plus GitHub tables, task lists, strikethrough and bare URLs. Unsafe javascript: links are neutralized. Rare edge cases of the CommonMark specification, such as complex emphasis nesting, may render differently from a fully spec-compliant parser, so check unusual input. The conversion runs in your browser and nothing is uploaded.

How to Use

  1. Paste HTML or Markdown and choose the direction.
  2. Pick the bullet character for lists when converting to Markdown.
  3. Copy or download the result.

Frequently Asked Questions

Which Markdown flavor is produced?

GitHub Flavored Markdown - fenced code blocks, pipe tables, ~~strikethrough~~ and task lists - which also renders in GitLab, Bitbucket and most static site generators.

What happens to HTML that Markdown cannot express?

Scripts, styles and form controls are removed. Inline elements such as <sup>, <sub>, <u> and <mark> are kept as HTML, which Markdown allows; other wrappers such as <span> or <div> keep only their content.

Is the Markdown to HTML output fully CommonMark compliant?

It covers the CommonMark core and the common GitHub extensions. Unusual edge cases, especially deeply nested emphasis, can differ from a reference parser.

Does my content leave the browser?

No. Both directions run locally in your browser.

Related Tools