HTML to Markdown

Convert HTML headings, links, code blocks and tables to Markdown locally, with an isolated preview and no input-resource loading.

Preview

How to use

Paste HTML source to create Markdown headings, lists, links, fenced code blocks and GitHub-style tables. This is useful when migrating a page or documentation snippet into a Markdown-based editor.

Source is parsed in an inert template and is never attached to the page. Scripts, styles, forms and embedded documents are removed. Dangerous link schemes are removed; image URLs can remain Markdown text but are not fetched by this tool.

Behavior and limits

The preview removes active links, images and other resource-loading elements and runs in a script-free sandbox. It does not reproduce the original CSS layout. Limits: 200,000 input characters, 20,000 DOM nodes and 256 levels.

Tables with merged cells are rejected; simplify colspan/rowspan first. Tables without a header receive an empty header row.

Questions & answers

Is every HTML layout preserved?

No. Markdown represents document structure, not arbitrary CSS, forms or scripts. Complex layouts need manual review after conversion.

Is my input sent to a server?

No. Processing runs in your browser and input is not submitted to an API. Original files and remote databases are not modified.

Other Languages

HTML to Markdown — Base64.sh

HTML to Markdown

Convert HTML headings, links, code blocks and tables to Markdown locally, with an isolated preview and no input-resource loading.

Share:

References

How we make sure

We check this tool with the automated test suites linked below. Example checks are shown in their original language.

Verification method
Check headings, links, tables, paragraphs/entity conversion and removal of active script/style content.
Comparison reference
Fixed DOM/text expectations, plus GFM tables/fences for Markdown.
Verification scope
These samples and boundaries do not prove correctness for every input.
Test source and cases (select a file to read it)
  • data-tools.test.js
    • HTML-to-Markdown keeps headings, links, GFM tables and fences while removing active source contents

These checks cover the listed examples and boundaries, not every possible input. Round trips and checks using the same library are not independent verification.