HTML to Markdown
HTML to Markdown converter
Paste HTML or enter a URL and get clean Markdown, with headings, links, lists, tables and code blocks. Pasted HTML is converted in your browser.
Markdown
# Trail Runner 2 A lightweight trail shoe for runners with **wide feet**. - 5 mm lugs for grip on wet rock - Rock plate under the forefoot | Size | Weight | | --- | --- | | EU 42 | 270 g | [Size guide](https://example.com/size-guide)
How to convert HTML to Markdown
Paste HTML or enter a URL
Paste a snippet or a whole page, or enter a URL to convert a live page.
Read the Markdown
Pasted HTML converts as you type, in your browser. A URL is fetched first, then converted.
Render JavaScript pages
For a page built by JavaScript, press Render the page first to convert the content a browser sees.
Copy or download
Copy the Markdown or download it as a .md file.
How HTML elements map to Markdown
- Headings
- <h1> to <h6> become # to ###### headings.
- Emphasis
- <strong> and <b> become **bold**, and <em> and <i> become _italic_.
- Links and images
- <a href> becomes [text](url) and <img> becomes .
- Lists
- <ul> and <ol> become - and 1. lists, with nested lists indented.
- Tables
- <table> becomes a GitHub-flavored pipe table, with the first row as the header.
- Code
- <pre><code> becomes a fenced code block, and inline <code> becomes `code`.
- Removed
- Scripts, styles, iframes and the page head are dropped. For a whole page, only the <main> or <article> element is converted when the page has one.
Markdown for AI agents
The As AI agents get it view shows the format Encited serves to AI agents. It differs from standard Markdown in four ways:
- Page chrome removed
- Navigation, forms, buttons, dialogs and the site header and footer are dropped, so only the page's content is left.
- Readable links
- Links are written as text (url), and a list of links as text: url, which a model reads without Markdown syntax.
- A header block
- The page's title, URL, description and language at the top.
- Structured data
- The page's JSON-LD at the end, so prices, ratings and stock stay attached.
Convert HTML to Markdown in JavaScript or Python
import TurndownService from "turndown";
const turndown = new TurndownService({ headingStyle: "atx", codeBlockStyle: "fenced" });
const markdown = turndown.turndown("<h1>Hello</h1><p>World</p>");# pip install markdownify
from markdownify import markdownify
markdown = markdownify("<h1>Hello</h1><p>World</p>", heading_style="ATX")HTML to Markdown FAQ
More free SEO tools
- SEO Audit30 checks for crawlability, SEO, and AI readiness
- Crawler SimulatorSee what 100+ search and AI bots get from your page
- Googlebot SimulatorFetch your page as Googlebot Smartphone or Desktop
- Verify GooglebotCheck if a crawler IP really belongs to Google
- Redirect CheckerTrace redirect chains and the status code of each hop
- Robots.txt CheckerCheck which crawlers are allowed or blocked
- OG Image CheckerCheck OG images and preview social link cards
- Meta Tag AuditAudit meta tags and generate a fix prompt
- AI Readiness CheckerCheck if ChatGPT, Claude and Perplexity can read your site
- llms.txt GeneratorGenerate and validate an llms.txt file
- Hreflang CheckerValidate hreflang codes and return links
- Canonical URL CheckerCheck canonical tags and their targets
Related guides
“Encited has become my go-to for all Lovable projects. I saw an uptick in crawls almost immediately after switching. Honestly one of the best dev/SEO tools I’ve used. Aki was also amazing on support. Love it!”






Serve your pages in AI-optimized markdown
An agent reads your page inside a context window it shares with the question and every competitor page it pulls in. Each snapshot is post-processed into lean HTML for search engines and Markdown for AI agents, so your specs, prices and reviews make it into the answer.
- Specs, prices and reviews stay intact for AI answers
- Same URL for every agent, no separate feed to maintain
- Lean HTML for search engines from the same snapshot
Tokens per format
/products/alpine-trek-gtx
- Rendered pageWhat a headless browser sees21,400
- Lean HTML
Served to search engines7,900
- Markdown
Served to AI agents2,650
GET /products/alpine-trek-gtx
Accept: text/markdown
200 text/markdown · 18ms from the edge
