TanodTools
EN

HTML to Markdown converter

Convert pasted HTML into Markdown locally. Scripts are not run, and some layout and formatting are lost.

Runs entirely in your browser

Paste HTML to begin.

For Word, Excel, PowerPoint or EPUB files, the paid Document to Markdown API returns chunks in the same format: POST https://tanod.dev/v1/docs/to-markdown with "chunks": "headings".

HTML up to about 5 MB, pasted or from an .html file. The result updates as you type.

How to convert HTML to Markdown

  1. Paste your HTML into the box, or open an .html file.
  2. Pick the heading, list and code block style you want. Tables are turned into Markdown tables unless you switch that off.
  3. Copy the Markdown, download it as a .md file, or download it split by heading as a .jsonl file of chunks.

Turning web pages into Markdown

Moving content out of a web page, an old CMS or a rich-text editor and into a README, a static site or a notes app usually means converting HTML to Markdown. The converter walks the HTML structure and writes each element in its Markdown form: headings become # lines, lists become dashes, links become [text](url), and <pre><code> becomes a code block.

Markdown only describes structure, so styling is left behind. Inline styles, classes, colours and layout containers disappear, while the words, emphasis, links, images and lists stay. Tables are written as GitHub Flavored Markdown tables when they are simple enough to fit that format.

Different projects prefer different Markdown habits, which is why the heading, list marker, code block and italic styles can be changed. Most renderers accept any of them.

The chunks download splits the Markdown by heading, for search indexes and retrieval tools. Each line of the .jsonl file is one chunk: its heading path, such as ["Setup", "Install"], the text, its length in characters, a token estimate (characters divided by 4, rounded up), a SHA-256 hash of the text (Unicode NFC, trailing spaces removed) and the anchor id when the heading or its section has one. A chunk holds at most 1,500 characters. Longer sections are split between paragraphs, then between lines. A fenced code block (```) is never split, and a long table is split between rows with its header repeated. Text before the first heading gets an empty path.

Tips

Questions

Does it load images or run scripts in the HTML?

No. The HTML is read into a detached document that the browser never displays, so scripts do not run and images, fonts and stylesheets are not fetched. Script and style blocks are dropped from the result.

How are tables converted?

Simple tables become GitHub-style Markdown tables, with the first row as the header and left, centre or right alignment kept when the HTML sets it. Tables with merged cells (rowspan or colspan) or a table inside a table can't be written as Markdown tables, so they are kept as HTML, which most Markdown renderers display as is. You can switch table conversion off to keep every table as HTML.

What is the difference between the heading and code styles?

ATX headings start with # signs (# Title) and work at every level; Setext headings underline the text with = or - and only exist for levels 1 and 2, so deeper headings still use #. Fenced code blocks wrap code in triple backticks and keep the language name from a language- class; indented blocks use four spaces, the older style.

What gets lost in the conversion?

Markdown has no way to express colours, fonts, classes, layout or form controls, so those are dropped and only the text and its structure remain. Strikethrough becomes ~~text~~ and checkboxes in list items become task list markers. Characters that would otherwise be read as Markdown, such as a leading # or *, are escaped with a backslash.