LaunchRanked

HTML to Markdown converter

Paste HTML from a page, a CMS or an email. Get clean, GitHub-flavored Markdown you can drop into docs, a README or an MDX blog.

Bullet character

With a page URL here, /docs becomes https://example.com/docs in links and images. Leave it empty to keep links as they are.

Output is GitHub-flavored Markdown: ATX headings, fenced code blocks and GFM tables. A <br> becomes a backslash line break. Scripts, styles, forms and embeds are dropped. Conversion runs in your browser; nothing is uploaded.

Paste HTML on the left, or load the example. The Markdown appears here as you type.

How the conversion works

The tool parses your HTML into a tree the way a browser would, forgiving unclosed tags, unquoted attributes and stray end tags. Then it walks the tree and writes GitHub Flavored Markdown, which builds on the CommonMark spec. Whitespace is collapsed the way a browser renders it, so the indentation in your source doesn’t leak into the output. Only <pre> blocks keep their spacing.

  • Code. Inline code gets a backtick fence longer than any run of backticks inside it. Blocks become fenced code, and a language-js or lang-js class becomes the fence language.
  • Links and images. Titles are kept. Add the page’s URL in “Resolve relative links against” and /docs becomes a full URL, which matters when the Markdown moves to a different site.
  • Tables. The header comes from <thead> or the first row. Pipes in cells are escaped, colspan and rowspan get empty filler cells, and single-column layout tables (common in emails) are unwrapped into normal paragraphs.
  • Escaping. Text that would accidentally become Markdown, like a paragraph starting with “1.” or “#”, gets a backslash. Underscores inside words (snake_case) are left alone because they can’t trigger emphasis.

Where it can’t match the HTML

Markdown has no underline, colors, merged cells or nested tables, so those are simplified. Bold text that ends in punctuation right before a letter (<b>Note:</b>text) can’t be written with asterisks, so it stays as a <strong> tag, which GitHub renders fine. Definition lists become a bold term followed by its definition, and <details> becomes a bold summary line.

Copying from a document instead?

If you’re moving text out of Google Docs or Word, use Paste to Markdown: it reads the clipboard directly and strips the extra markup those apps add. For data, try the CSV, JSON or XML converters. Once the post is in Markdown, check its length with the word counter and the reading time calculator.

Questions

Which Markdown flavor does it output?

GitHub Flavored Markdown. Headings use # (ATX style), code uses fenced blocks, and tables use GFM pipe tables. Tables and strikethrough are GFM extensions, so they render on GitHub, GitLab and most static site generators, but not in a strict CommonMark renderer.

Why does a line end with a backslash?

That's how a <br> is written. In CommonMark a backslash at the end of a line is a hard line break. The other way, two trailing spaces, is invisible and editors often strip it, so we use the backslash. Two <br> tags in a row become a new paragraph instead.

What happens to scripts, forms and embeds?

They're dropped: head, script, style, noscript, iframe, svg, and form controls such as inputs, selects and buttons. Unknown inline tags keep their text. Everything else maps to the closest Markdown, and cells with lists or paragraphs are flattened with <br> because GFM tables can't hold block content.

Is my HTML uploaded anywhere?

No. The parser and converter run in your browser as JavaScript. Nothing is sent to a server and nothing is saved.

Autopilot · early access

Want this fixed automatically?

Autopilot checks your site, publishes researched articles at a safe pace, and tracks whether ChatGPT, Perplexity, Gemini and Claude cite you. $49/mo.

Related free tools

See all free tools