Free tool · HTML to markdown
HTML to markdown
Paste HTML and get markdown: headings, lists, links, tables and code blocks, without the markup around them. The HTML is rendered in a real browser first, so content that its scripts build is included. Or switch to From a URL to convert a live page.
What the markdown contains
| HTML | Markdown |
|---|---|
<h1> to <h6> | # to ###### headings |
<ul>, <ol>, nested lists | - and 1. lists |
<a href>, <img> | [text](url),  |
<table> | GitHub-flavored markdown tables |
<pre><code class="language-js"> | fenced code blocks with the language |
<b>, <strong>, <i>, <em> | **bold**, _italic_ |
Scripts, styles, form controls, hidden elements and embedded media are left out.
What people use it for
- Moving content out of a CMS, a WYSIWYG editor or an HTML email into markdown files, a wiki or a docs-as-code repository.
- Preparing text for LLMs and retrieval (RAG) pipelines: the structure stays, the markup goes.
- Cleaning up HTML copied from a web page or a word processor.
Limits
| Limit | Value |
|---|---|
| HTML size | 1 MB in this tool, 5 MB with the API |
| Time per conversion | about 12 seconds; slower documents are stopped |
| Resources | images and links keep their URLs; relative URLs have no page address to resolve against |
HTML to markdown in your code
The screenshotbase API converts HTML you POST to /v1/take with format=markdown, and web pages by their URL with a GET. AI agents can use it through the MCP server. For live pages, see URL to markdown.
Frequently asked questions
How do I convert HTML to markdown?
Is the whole HTML converted?
Why render the HTML in a browser first?
Is my HTML stored?
How large can the HTML be?
Markdown API
Convert HTML to markdown from your code
POST /v1/take with html and format=markdown renders the HTML in a real browser and returns its content as markdown, as text or as JSON with the title and description. GET /v1/take does the same for a URL.
/v1/take documentation URL to markdown API All documentation
300 free requests every month, and each conversion counts as one. No credit card required.
POST https://api.screenshotbase.com/v1/take
curl -X POST "https://api.screenshotbase.com/v1/take" \
-H "apikey: YOUR-API-KEY" \
-H "Content-Type: application/json" \
-d '{"html": "<h1>Hello</h1><p>From <b>HTML</b>.</p>", "format": "markdown", "markdown_main_content_only": false}'
# Response: the markdown (text/markdown)
# Hello
From **HTML**.