Polyatic HTML to Markdown

HTML → Markdown Converter

Paste HTML on the left and get clean, GitHub-flavored Markdown on the right — live, as you type. Copy it or download the .md. Nothing is uploaded.

HTML input
Markdown chars 0 Lines 0
Markdown output

Runs entirely in your browser — nothing is uploaded. The HTML you paste is parsed and converted on your own device by a vendored copy of the Turndown library; there are no network requests and no analytics on this tool. Script and style tags in your HTML are stripped, so pasting content from anywhere is safe.

Turning HTML back into Markdown

Markdown is the plain-text shorthand behind most READMEs, wikis, static-site posts and chat messages: you write # Heading or **bold** and a renderer turns it into HTML. This tool runs that pipeline in reverse. You paste HTML — copied from a web page, exported from a CMS, or produced by a rich-text editor — and it emits the equivalent Markdown, so you can store, diff or re-publish the content as clean text instead of tag soup. It is the mirror image of our Markdown Previewer, which goes the other way.

How the conversion works

One small library does the work, vendored into this page so nothing loads from a CDN. On every keystroke, Turndown (v7.2.0, MIT-licensed) parses your HTML with the browser's built-in DOMParser, walks the resulting document tree node by node, and applies a rule for each element — an <h2> becomes ## , an <a> becomes [text](url), an <li> becomes a - bullet, and so on. Because the HTML is parsed rather than pattern-matched with regular expressions, deeply nested and slightly malformed markup is handled the same way a browser would render it. A companion plugin, turndown-plugin-gfm (v1.0.2, MIT), adds the GitHub-flavored extras: pipe tables, ~~strikethrough~~ and - [ ] task-list checkboxes.

What converts cleanly

Anything with a direct Markdown equivalent survives the round trip intact:

  • Headings <h1><h6># to ###### (ATX style).
  • Emphasis <strong>/<b>**bold**, <em>/<i>*italic*.
  • Links and images[text](url) and ![alt](src), keeping the URLs exactly as written.
  • Lists, ordered and unordered, including nested lists, with correct indentation.
  • Blockquotes> prefixed lines; horizontal rules---.
  • Code: inline <code> stays as `code`, and <pre><code> blocks become fenced ``` code blocks with the text preserved verbatim.
  • Tables with a simple rectangular shape → GitHub pipe tables; strikethrough and task lists come through thanks to the GFM plugin.

What doesn't — the honest limits

Markdown is deliberately small, so a lot of HTML has no equivalent and is simplified or dropped. Knowing this up front saves you a puzzled edit later:

  • Inline styles and CSS. style="color:red", font sizes, background colors, class names and IDs all vanish — Markdown carries no styling at all. Text formatted only with CSS (say, a "heading" that is really a bold <span>) arrives as ordinary text.
  • Complex tables. Pipe tables are strictly rectangular. A table using colspan or rowspan to merge cells cannot be expressed and will come through misaligned; reshape it into a plain grid, or keep it as raw HTML, before converting.
  • Layout and interactive elements. Multi-column <div> layouts, <form>s, buttons, <iframe>s, <video>, SVG and canvas have no Markdown form. Their visible text is usually kept, but the structure is flattened.
  • Syntax highlighting. Highlighted code in HTML is a nest of <span>s with color classes. Those flatten to plain text — the correct Markdown — so the code is intact but uncolored, and you may need to add the language label after the opening fence yourself.
  • Scripts and styles are removed entirely: <script>, <style>, <noscript> and document metadata are stripped so nothing executable or invisible leaks into your text.

A useful rule of thumb: content that a human would call an article — prose, headings, lists, quotes, code and simple tables — converts almost perfectly, while content that is really a web application — dashboards, forms, styled layouts — does not, because Markdown was never meant to describe it.

Copy it or keep the .md

Copy puts the Markdown on your clipboard, ready to paste into a README, a pull-request description, an issue or a static-site post. Download .md saves the output as a converted.md file you can commit to a repository straight away. Both act on exactly the text shown in the output pane, so what you see is what you get. The output textarea is editable-selectable, so you can also just select the parts you want.

When to reach for this

Common jobs: migrating blog posts or documentation out of a CMS into a Git-based static site; capturing a useful web article as clean Markdown notes; converting the HTML a WYSIWYG email or forum editor produced into portable text; or cleaning up AI-generated HTML into something you can version-control. Because it runs locally with no upload, it is equally suited to internal or confidential material that must not touch a third-party server. For anything Markdown genuinely cannot represent, convert first and then hand-fix the handful of spots the limits above call out — that is almost always faster than starting from raw HTML.