What Is an HTML to Markdown Converter?
An HTML to Markdown converter turns web page code into Markdown, the simple text format with # for headings, ** for bold and - for list items. Markdown keeps the structure of your content but drops all the tags, classes, scripts and styles.
That makes it the best format to give AI tools. When you paste a page into ChatGPT, Claude or Gemini, or feed it to a RAG system, Markdown uses far fewer tokens than raw HTML and the model sees clear headings instead of noise. It is also the format the llms.txt proposal suggests for the clean .md versions of your pages.
How to Use the Converter
- Copy the HTML. In your browser, right click a page, choose View Page Source, then select all and copy. A snippet from your CMS works too.
- Paste it into the HTML box. The conversion updates as you type.
- Choose your options. Keep only the main content, keep or drop links and images, and convert tables.
- Check the token savings to see how much smaller the Markdown is.
- Copy or download the Markdown as a
.mdfile.
How HTML Becomes Markdown
| HTML | Markdown |
|---|---|
<h2>Title</h2> | ## Title |
<strong> and <em> | **bold** and *italic* |
<a href="url">text</a> | [text](url) |
<img src alt> |  |
<ul> and <ol>, including nested lists | - item and 1. item |
<table> | A pipe table with a header row |
<pre><code> | A fenced code block with the language kept |
<script>, <style>, <nav>, forms | Removed |
The output follows common GitHub Flavored Markdown, which ChatGPT, Claude, GitHub, Notion and most docs tools understand.
Tips for Clean Results
- Use semantic HTML. Pages built with real
<main>,<article>and heading tags convert most cleanly. - Drop links for summaries. If you only want an AI to read the text, untick links to save more tokens.
- Check tables. Merged cells cannot be shown in Markdown, so very complex tables may need a quick tidy.
- Nothing is fetched. The tool only converts what you paste, and images are not loaded.
Make Your Content Easy for AI to Read
See why structure matters in structuring HTML for AI crawlability and HTML semantic elements explained, then learn how this ties into llms.txt. Going the other way? Use the Markdown to HTML converter.
Frequently Asked Questions
1Why convert HTML to Markdown for ChatGPT or Claude?
Markdown keeps headings, lists and links but drops tags, scripts and styles. A typical page uses far fewer tokens as Markdown, so it costs less, fits more into the context window and is easier for the model to follow.
2Can I convert a page just by entering its URL?
No. To keep everything private and in your browser, the tool does not fetch other sites. Open the page, view its source, and paste the HTML into the box.
3Does it keep tables and nested lists?
Yes. Tables become Markdown pipe tables with a header row, and nested bullet or numbered lists keep their indentation. Merged table cells cannot be shown in Markdown.
4Is the converted Markdown safe to publish?
The converter only outputs text and Markdown syntax, and scripts, styles and forms are removed. Always read the result before you publish it, especially links copied from someone else's page.