GreyScript AI

HTML to Markdown Converter

Convert an HTML file, raw HTML or content copied from a web page into clean Markdown. Navigation, headers and footers can be dropped automatically, and nothing is uploaded.

1. Choose files
or paste rich text or HTML
Coming soon OCR for scanned PDFs and images · AI cleanup of messy layouts
2. Markdown output (editable)
PDF files store positioned text, not structure, so headings are inferred from font size and paragraphs from line spacing. Check headings and tables in long or multi-column PDFs. Token counts use a rough 4-characters-per-token estimate. Excel dates are converted when the cell is formatted as a date; formulas show their last saved value.

How HTML to Markdown conversion works

The converter uses turndown with GitHub-flavoured Markdown rules. Headings, links, bold and italic text, lists, blockquotes and code blocks map directly to Markdown, and tables become Markdown tables. Scripts, styles, forms and embedded frames are removed.

With keep main content only switched on, the converter uses the page's <main> or <article> element when there is one and removes navigation, header, footer and sidebar elements. That usually leaves just the article, which is what you want for documentation or an AI prompt.

Three ways to convert

The converter cannot fetch a page from a URL. Browsers block one website from reading another website's pages (the same-origin policy), so open the page yourself and copy or save it.

Questions and answers

Can I convert a web page by entering its URL?

No. Browsers do not let one site read another site's pages, so the tool cannot fetch a URL. Open the page, select the content and paste it here, or save the page as HTML and upload the file.

Are links and tables kept?

Yes. Links become Markdown links and tables become Markdown tables. Tables without a header row get their first row promoted to the header, because Markdown tables need one.

Why convert HTML to Markdown for an LLM?

Markdown keeps the structure an LLM needs, such as headings, lists, links and tables, without tags, attributes, scripts and styling. The same content takes fewer characters, and so fewer tokens, and is easier to split into chunks.