HTML to Markdown

Turn a page or a fragment into clean Markdown: headings, lists, tables, code blocks and links, with the script tags left behind.

html
Markdownmarkdown
The result appears here

Questions

What happens to tables and code?+

Tables become GitHub-flavoured Markdown tables, and a pre with a language class keeps that language on the fence. Both are the parts hand-rolled converters usually drop.

Why is some punctuation escaped?+

Because a line starting with a dash or a hash would otherwise become a list item or a heading. The escapes are what keep the text meaning what it said in HTML.

Can I feed it a whole page?+

Yes. Script, style, noscript and template elements are removed first, so what comes out is the content rather than the framework's payload.

Related tools

The tools are free. So is most of the library.

1935 blocks and 989 pieces for shadcn/ui and Tailwind, built on the same tokens these tools write. Install one with a command and the code is yours.

No signup for the tools. MIT for free blocks, commercial licence for Pro.

Markdown version