Document tools

HTML to Markdown

Convert html to markdown with pandoc. Runs entirely on your device.

Runs on your device. The file is never uploaded.

HTML to Markdown reads a saved page or a fragment and writes pandoc extended Markdown, which has table, footnote and definition list syntax strict CommonMark lacks. An img tag becomes an image link with the same src and nothing is fetched. Nothing decides which part was the article, so navigation, sidebars and footers convert too.

Input

Questions

Which flavour of Markdown do I get?

Pandoc's own extended Markdown, not CommonMark and not GitHub Flavored Markdown. That means you might see constructs GitHub will not render, such as fenced divs written with three colons, attribute blocks in curly braces, or grid tables. If the destination is strict about its dialect, skim the output and simplify those few spots by hand.

What happens to CSS, scripts and page layout?

They are dropped, because Markdown has nowhere to put them. Pandoc reads the document structure, so headings, paragraphs, lists, links, images, tables and code come across; fonts, colours, positioning, class names and JavaScript do not. What you get is the content of the page, not its appearance.

Can I convert a whole saved web page?

You can, but you will get the whole page: navigation, sidebars, cookie banners and footers all become Markdown text, because nothing here decides which parts were the article. Trim the HTML down to the content element first if you want a clean result.

Are images downloaded?

No. An img tag becomes a Markdown image link with the same src, whether that is a relative path or a remote URL. Nothing is fetched: pandoc runs as WebAssembly inside this tab with no network of its own, so a remote image stays a remote reference.

What is the output file called?

Your file name with the .md extension, so page.html becomes page.md. The Markdown is shown on the page as well, with a copy button that copies all of it even when the on-screen preview is shortened. A page full of markup that Markdown cannot hold will produce a noticeably shorter file than the HTML you started with, which is expected rather than a sign that something failed.

How do I convert Markdown to HTML?

Use Markdown to HTML, which is the same pandoc engine pointed the other way. It writes an HTML fragment rather than a full page, which is the mirror image of this tool's behaviour: it reads a full page perfectly well but keeps only what Markdown can hold.

Related Document tools