Tools / Text & Data / HTML to Markdown
Client-side

HTML to Markdown

Paste an HTML snippet from a CMS, an email or a web page and get tidy Markdown back, converted locally in your browser.

What it does

  • Keeps headings, paragraphs, bold, italic, links, images, lists, blockquotes, inline code and code blocks
  • Drops script and style blocks plus class, id and style attributes
  • Nested lists become indented Markdown lists
  • Runs locally in WebAssembly, the markup never leaves the tab

This page cleans HTML you copied from somewhere (a CMS editor, an HTML email, a docs export, the source of a web page) into plain, readable Markdown, directly in your browser. Paste the markup, press Convert, and copy the Markdown. Typical reasons: moving content into a Markdown docs folder or note app, getting rid of the inline styles and class soup an editor leaves behind, or preparing text for an AI prompt, where Markdown is usually much shorter than the raw HTML it came from. If you want the general guide to the converter, see the HTML to Markdown tool page.

What this conversion actually does (and does NOT do)

The converter walks the HTML tree and maps the structural elements it knows to Markdown. Headings h1 to h6 become # headings, paragraphs stay paragraphs, strong/b become **bold**, em/i become *italic*, links become [text](href) with the href kept exactly as written (relative URLs included), images become ![alt](src), ul and ol become bullet and numbered lists (nested lists are indented), blockquote becomes > quotes, hr becomes ---, inline code gets backticks and pre becomes a fenced code block. Script and style blocks are removed, and so are all class, id and style attributes. HTML entities such as & and   are decoded to real characters.

Several things are not converted, and it is better to know before you paste:

  • Tables: there is no table conversion. A <table> is flattened to the text of its cells, run together, with no pipes and no HTML kept. Rebuild tables by hand, or keep the original HTML for them.
  • Code block languages: a <pre><code class="language-js"> block becomes a plain ``` fence, without the language tag.
  • Line breaks: a <br> inside a paragraph or list item becomes a space, so addresses or poems written with <br> end up on one line.
  • Whole pages: there is no main-content extraction. If you paste a full page, the text of the <title>, menus and footer links ends up in the output too, sometimes glued to the first heading. Paste only the article part.
  • Other elements: strikethrough (del, s), definition lists, figure captions and form fields come out as plain text. Characters such as *, _ or < in the text are not escaped.

The output style is fixed: ATX # headings, - bullets, * for italic, ** for bold and fenced code blocks. Other converters may choose differently, so the same HTML can give slightly different Markdown elsewhere.

When to choose Markdown over keeping the HTML

Choose Markdown when the destination reads it natively or when portability matters more than presentation: static site generators, README and docs files, GitHub issues and wikis, note tools and AI prompts. It works best on text-heavy content such as articles, documentation and email bodies. Keep the HTML when the content depends on tables, exact styling, scripted behavior or layout, since this converter does not carry those over. To render Markdown back to web markup, use Markdown to HTML.

How to convert HTML to Markdown

  1. Paste your HTML into the input box. A fragment (the article body, an email body) gives the cleanest result.
  2. Click Convert.
  3. Check the Markdown, especially where the source had tables, line breaks or code blocks with a language.
  4. Copy the Markdown with the copy button.

No upload. It runs on your device.

The conversion is Rust compiled to WebAssembly, running inside your browser tab. Your HTML is not sent anywhere: there are no network requests for the conversion itself, and there is nothing to delete afterward because nothing was uploaded. You can confirm it in the DevTools Network tab while you convert. This matters because HTML often carries sensitive material: internal documentation, confidential CMS exports, and HTML emails containing customer data.

No limits

No length cap, no watermark, no sign-up. The practical ceiling is your device's memory.

Frequently asked questions

What gets removed when HTML is converted to Markdown?
Script and style blocks, and every class, id and style attribute. Colors, fonts and layout are lost because Markdown has no syntax for them. Headings, paragraphs, emphasis, links, images, lists, quotes and code survive.
Are HTML tables converted to Markdown tables?
No. Tables are not converted: the cell text is flattened into a single run of text, without pipes and without the original HTML. If tables matter, rebuild them in Markdown by hand or keep that part as HTML.
Is the language of a code block kept?
No. The code inside <pre> is kept verbatim in a fenced block, but a language-xxx class is dropped, so add the language after the opening ``` yourself if you need highlighting.
Why are my line breaks gone?
A <br> inside a paragraph or list item is turned into a space. Add a blank line or two trailing spaces in the Markdown where you need a break.
Can I paste a whole web page?
You can, but the result will include the page title, navigation and footer text, because there is no detection of the main content. Copy just the article element for clean output.
Are relative links and images kept?
Yes. The href and src values are copied as they are, including relative paths such as /docs/page, so you may need to make them absolute for the new location.
Is my HTML uploaded to a server?
No. It converts in your browser using Rust compiled to WebAssembly, with no network requests for the conversion. You can verify this in the DevTools Network tab.
Can I clean internal HTML before pasting it into ChatGPT or Claude?
Yes. Markdown is usually much shorter than the HTML it came from, and here the cleanup happens without sending the markup to a third-party server first. For agent workflows, the VaultTools MCP server offers the same conversion on files on disk.
Will entities like &amp; and &nbsp; be decoded?
Yes, they become real characters. If you only need entity handling, the HTML entities tool does that directly.

Related tools: the main HTML to Markdown tool page, the reverse direction with Markdown to HTML, the HTML entities encoder and decoder, or the full text and data tools hub. To understand why everything runs locally, read why we built VaultTools privacy-first.