HTML to Markdown
Clean Copies for AI Agents

Paste a page or fetch a URL and get tidy Markdown. Keeps headings, links, lists, tables and code, drops navigation and scripts, adds optional front matter, and suggests the .md file name llms.txt v2 expects. 100% client-side. Zero data stored.

HTML to Markdown illustration: an HTML page with tags on one side converting into a short Markdown file with headings and links on the other

HTML to Markdown Converter

HTML source

The raw HTML is fetched through the RJL.io proxy. No JavaScript runs, so you see what a crawler that skips JavaScript gets.

Markdown

Conversion options
Characters
0
Words
0
Tokens (estimate)
0
Links / images

Tokens are an estimate: characters divided by four. A real model counts with its own tokenizer, so the true number differs.

Where to publish it (llms.txt v2 naming)

Enter the page URL above to see the full path to serve it from.

What People Use It For

Markdown copies for AI agents

Make a page.html.md or page.md next to a page, the naming llms.txt v2 describes, so an agent can read the content without the menus and scripts.

Feed a page to a chatbot

Paste a long article into an assistant as Markdown. It costs fewer tokens than raw HTML and keeps the headings, lists and tables the model needs.

Move docs into a repo

Turn an old help page or wiki entry into a README or a static-site content file, with the links already absolute.

See what a crawler reads

Fetch your own page and read the result. If your main content is missing, a crawler that does not run JavaScript is missing it too.

Archive and notes

Save an article as plain text with a front matter block holding its title, address and date, ready for a notes app.

Tables to GitHub tables

Paste an HTML table and get a pipe table that renders on GitHub, in a pull request or in a chat window.

What Converts, and How

How each HTML element is converted
HTML Markdown
<h1> to <h6># to ######
<strong>, <em>, <del>, <code>**bold**, *italic*, ~~strike~~, `code`
<a href>, <img>[text](url) and ![alt](url), with the address made absolute from the page URL
<ul>, <ol>, nested lists- and 1. items, indented under their parent; checkboxes become [ ] and [x]
<table>A GitHub-flavored pipe table; the first row is the header and | inside a cell is escaped
<pre><code class="language-js">A fenced block with the language name
<blockquote>, <hr>, <br>> quotes, ---, and a hard line break
<script>, <style>, <iframe>, <svg>, forms, buttons, hidden elementsLeft out

Main content only

Looks for <main>, then a single <article>, then common content containers, and removes navigation, page-level headers and footers, sidebars and forms. A page with several articles is converted whole, minus that chrome.

File names

llms.txt v2 puts a page's Markdown copy at the same URL with .md appended (/docs/page.html.md) or the extension replaced (/docs/page.md). A URL with no file name uses index.html.md or index.md. Spec: llmstxt.org.

Point the page at its copy

Add <link rel="alternate" type="text/markdown" href="/docs/page.html.md"> to the page head, or build the tag and the matching Link header with the llms.txt Generator.

Token estimate

Characters divided by four, rounded up. It is a rule of thumb for English text, not a tokenizer, so code, other languages and emoji can differ a lot.

No JavaScript

The converter reads the HTML you give it and runs nothing in it. A page that builds its content in the browser comes out nearly empty; copy the rendered HTML from your browser's inspector instead.

Safe by design

The HTML is parsed into an inert document: scripts do not run, images do not load, and only text comes out. Pasted HTML never leaves your browser.

Frequently Asked Questions

Why We Built This HTML to Markdown Converter

AI assistants and answer engines read the web through pages that were built for browsers. A typical page wraps a few hundred words in thousands of characters of markup, menus, tracking code and cookie banners. Markdown strips that away and keeps the structure a reader needs: headings, paragraphs, links, lists, tables and code. Offering a Markdown copy next to a page is one way to make your content cheaper and easier for an agent to read, and the llms.txt proposal gives the file names to use.

We also want to be straight about it. Google says its AI features need no special files, and nobody can promise that a Markdown copy changes how an assistant treats your site. What the converter does give you is certainty about what a no-JavaScript reader gets from a page: if the text is missing from the output, it is missing from the HTML. It reads the markup in an inert parser, so nothing in a pasted page runs, and your HTML stays in your browser unless you press Fetch.

The HTML to Markdown converter is part of RJL.io's collection of free developer tools. Describe the Markdown copies in an index with the llms.txt Generator, decide which AI crawlers may read your site with the robots.txt Generator, audit a page with the SEO Analyzer, or preview the result in the Markdown Viewer.

Your SEO + AI search toolkit

This is the last step, Verify. Re-run the SEO Analyzer to confirm every fix.

Run the SEO Analyzer