Tools

HTML to Markdown for LLMs

Turn a web page's HTML into clean Markdown, with tables kept and navigation, scripts and footers removed.

Runs in your browserAI developer tools11.4K
Free

Input

0 B

Result

The result will appear here.

Pasting raw HTML into a model wastes most of the context on tags, class names, scripts and menus, and the model still has to guess which part is the article. Markdown keeps what matters — headings, lists, links, code blocks and tables — at a fraction of the tokens. Paste the page source; the converter keeps the main or article element when there is one, strips everything around it, and converts the rest with mixmark-io/turndown. For whole sites or PDFs and Office files, jina-ai/reader and microsoft/markitdown do the same job as a service and a Python tool.

How it works

  • The HTML is parsed by your browser's DOMParser, so malformed markup is repaired the same way a browser would repair it before conversion.
  • Tables become GitHub-style pipe tables with a rule written for this tool, because Turndown alone keeps them as HTML.
  • Scripts, styles, forms, nav, aside and page-level header and footer are removed; an article's own header with its title is kept.

Where your data goes

Nowhere. This tool runs entirely in your browser: the text you paste is processed by the page and is never transmitted to a server or written to a log.

This tool is free and needs no account. Its results exist only in your open page and are not saved anywhere.

What it costs

This tool is free, with no sign-in and no points.

Common questions

Can I give it a URL instead of HTML?
Not here: a page in your browser cannot read another site's HTML, because the other site's CORS rules block it. Open the page, view its source or copy the element from developer tools, and paste that. For fetching URLs in bulk, a server-side reader such as jina-ai/reader is the right tool.
How are merged cells handled?
A cell with colspan is followed by empty cells so every row keeps the same number of columns. Rowspan has no Markdown equivalent and is not reproduced. A table with a single row or column is treated as layout and unwrapped into paragraphs, which is what such tables almost always are.
Why are the backslashes missing compared with other converters?
Turndown normally escapes every underscore and asterisk in text, which turns Q4_K_M into Q4\_K\_M. That protects rare emphasis collisions at the cost of noise on every page, so this tool only escapes characters that would turn a line into a heading, quote or list.

The open-source behind it

This tool runs on mixmark-io/turndown, released under MIT. If you need the same behaviour inside your own program, that is the library to reach for.

mixmark-io/turndown

Also known as

  • html to markdown
  • convert html to markdown
  • webpage to markdown for llm
  • html to md
  • turndown online