UtilitiesTools

HTML to Markdown

Paste HTML and instantly get clean, structure-preserving Markdown — headings, lists, links, code, and tables intact. Copy it or download a .md file. Your HTML is converted in your browser and never leaves your device.

🔒 Converted in your browser. Nothing is uploaded or stored.

What is the HTML to Markdown converter?

The HTML to Markdown converter is a free online tool that turns a block of HTML into clean, readable Markdown. You paste markup copied from a webpage, a CMS export, a rich-text editor, or an email, and the tool rewrites it as the lightweight Markdown syntax that powers READMEs, GitHub issues, static-site blog posts, documentation, and wikis. Instead of a wall of angle brackets you get the simple, portable text format that developers and writers actually want to commit and edit.

The conversion runs entirely in your browser, so your HTML never leaves your device. That matters when the page you are converting is an unpublished draft, an internal document, or content under an agreement you would rather not leave on someone else's machine. Nothing is uploaded, logged, or saved.

How to use it

  1. Paste your HTML into the input box on the left (or top, on a phone).
  2. The Markdown appears beside it the instant you stop typing — there is no Convert button to hunt for.
  3. Click Copy to put the Markdown on your clipboard, or Download .md to save it straight to a file.
  4. Close the tab when you are done; nothing is stored.

The method behind it

The tool parses your HTML with the browser's built-in parser and then walks the resulting document tree node by node, mapping each element to its Markdown equivalent. Headings, emphasis, lists, links, and tables each have a dedicated rule, while whitespace between inline elements is collapsed the same way a browser collapses it on screen. Characters that are special in Markdown but appear as literal text in your HTML are escaped with a backslash so they display as written. Because the whole pipeline is a deterministic transform over the parsed tree, the same HTML always produces the same Markdown.

What it preserves

A good conversion keeps structure, not just words. This tool maps each element to its Markdown equivalent:

Visual-only or unknown tags such as <span> and <div> degrade gracefully to their text content rather than being dropped or breaking the layout, and script and style blocks are stripped.

Examples

Common use cases

Why use this converter

It is faster and more private than most: there is no upload, no account, and no rate limit, the output updates live, and you can copy or export a Markdown file in a single click. It also keeps the document structure intact, so you spend your time editing prose instead of repairing broken lists and tables.

It is also part of a small, focused developer toolkit. If you need the reverse direction, Markdown to HTML renders Markdown back into HTML. To tidy messy markup before converting, the HTML Formatter indents and pretty-prints it. And to compare two versions of the converted text, the Text Diff Checker highlights every change.

Frequently asked questions

Is my HTML uploaded anywhere when I convert it?

No. The entire conversion happens inside your browser using JavaScript — your HTML is never sent to, stored on, or seen by any server. That makes it safe to convert unpublished posts, internal documentation, or private pages.

Which HTML elements are converted to Markdown?

Headings (h1–h6), paragraphs, bold and italic, strikethrough, ordered and unordered lists (including nested lists), links, images, blockquotes, inline code and fenced code blocks, horizontal rules, and tables are all mapped to their Markdown equivalents. Unknown or purely visual tags fall back to their text content instead of breaking the output.

Does it produce GitHub-Flavored Markdown (GFM)?

Yes for the common cases. Tables use the GFM pipe syntax, strikethrough uses double tildes, and fenced code blocks keep their language hint when the original code element carries a language- or lang- class. The rest is standard CommonMark that renders anywhere.

Can I download the result as a .md file?

Yes. Alongside one-click copy, there is a Download .md button that saves the Markdown straight to a file, ready to drop into a repository, a docs folder, or a static-site post.

Why is some text wrapped in backslashes after converting?

Characters that are special in Markdown — such as asterisks, backticks, or brackets that appear as literal text in your HTML — are escaped with a backslash so they display as written instead of being interpreted as formatting. This keeps the converted output faithful to the original.