LazyTools

🔒 Every tool runs in your browser, the files and values you enter are never uploaded to any server. How it works

📝 HTML to Markdown Converter

Paste HTML and get clean Markdown, headings, links, lists, bold and code all converted, locally.

Everything runs locally in your browser, nothing is uploaded. This is the inverse of the Markdown-to-HTML converter.

Rate this tool:
Anonymous, no account, no identifier

How the html to markdown converter works

The tool converts HTML to Markdown with Turndown, a well-established client-side library: headings become #, links become [text](url), <strong>/<em> become ** / _, lists become - or numbered items, and <pre>/<code> become fenced code blocks. It's the inverse of the Markdown-to-HTML converter, useful for turning web content, rich-text output or pasted HTML into clean Markdown for docs, wikis or READMEs. Turndown walks the parsed DOM tree, so it reads the actual element structure rather than pattern-matching raw text: an <h2> becomes ## regardless of how the source was indented, and a nested <ul> inside an <li> is indented as a sub-list. Elements with no Markdown equivalent, such as <div> or <span>, are unwrapped, their text is kept while the tag itself disappears.

Markdown is far easier to edit and version-control than HTML, so converting pasted or generated HTML back to Markdown is a common writing and documentation task. Turndown keeps the structure and drops presentational cruft. Everything runs in your browser, the HTML, which might be internal content, never leaves your device.

Frequently asked questions

How do I convert HTML to Markdown?

Paste your HTML or load a .html file and the tool outputs Markdown you can copy or download. Headings, links, lists, emphasis and code are all converted.

Is this the reverse of the Markdown-to-HTML tool?

Yes. It takes HTML and produces Markdown, the opposite direction. Round-tripping isn't always byte-identical because HTML can express things Markdown can't, but structure and content carry over cleanly.

What happens to complex HTML like tables or styles?

Standard elements convert well; inline styles and non-semantic markup are dropped, since Markdown has no equivalent. Tables convert to Markdown (GitHub-flavoured) where the structure allows.

Can I paste a whole web page's HTML?

Yes, but expect some noise: page chrome, navigation and scripts become stray text or are dropped, since only content elements map to Markdown. For the cleanest result, copy just the article or section you want rather than the entire page source.

Why did an inline image turn into odd text?

An <img> becomes Markdown image syntax ![alt](src). If the src is a long data URI (an inlined Base64 image), that whole string appears in the output, replace it with a real file path, or remove the image tag before converting.

Is my HTML uploaded?

No, the conversion runs entirely in your browser with Turndown, so the content stays on your device and it works offline.

Related file converters