Web & Developer

HTML to Markdown Converter

Paste raw HTML and get clean, readable Markdown for blogs, documentation, README files, and notes. Converts headings, lists, links, images, code, tables, and more.

Ready. Paste HTML above and click Convert.

How it works

The tool parses your HTML string into a Document Object Model (DOM) tree using the browser's built-in DOMParser. It then walks the tree recursively, mapping each element to its Markdown equivalent — <h1> becomes #, <a> becomes [text](url), <ul>/<ol> become bullet or numbered lists, and inline tags like <strong> and <em> wrap text with ** or *. Text nodes are escaped so characters like *, _, and [ don't break formatting. Tables are rebuilt row-by-row into pipe syntax. The result is a clean, human-readable Markdown string — all performed locally in your browser, with nothing sent to any server.

Frequently asked questions

How do I convert HTML to Markdown?

Paste your raw HTML into the input box above, click "Convert to Markdown," and the tool will instantly generate the equivalent Markdown text. You can copy it to your clipboard or download it as a .md file. The conversion runs entirely in your browser, so your content stays private.

Does the converter handle tables, code blocks, and images?

Yes. The converter supports headings, paragraphs, lists (bulleted and numbered), links, images, bold/italic/underline, inline code, fenced code blocks, blockquotes, horizontal rules, tables (into pipe syntax), and line breaks. Nested elements are preserved as much as Markdown allows.

Is it safe to convert HTML online with this tool?

Absolutely. All conversion happens locally inside your browser using standard JavaScript — no HTML is uploaded to any server. You can safely paste private documentation, drafts, or code-containing HTML without worrying about leaks.

Related tools More free utilities

Free tools by TUNA — energy supply from vetted manufacturers