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.

The HTML is rendered in a real browser (Chromium), so content that its scripts add is included, then converted. Up to 1 MB of HTML; renders that need more than about 12 seconds are stopped.

What the markdown contains

HTMLMarkdown
<h1> to <h6># to ###### headings
<ul>, <ol>, nested lists- and 1. lists
<a href>, <img>[text](url), ![alt](src)
<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

LimitValue
HTML size1 MB in this tool, 5 MB with the API
Time per conversionabout 12 seconds; slower documents are stopped
Resourcesimages 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?

Paste the HTML (a whole document or a fragment) into the field under From HTML and click Convert to markdown. After a few seconds you can copy the markdown or download it as a .md file.

Is the whole HTML converted?

Yes, by default: pasted HTML is usually all content. Tick Main content only to keep just the article and drop navigation, sidebars, headers and footers, as for web pages. Scripts, styles, form controls and hidden elements are always left out.

Why render the HTML in a browser first?

So the markdown has what a reader would see: text that scripts add, elements CSS hides left out, and links and images kept with their URLs (relative ones resolve only when the HTML sets a base URL with a base element). A plain text converter only sees the markup.

Is my HTML stored?

No. The markdown is sent to your browser and not stored on our servers, and the HTML is not stored or logged. Copy or download the markdown before you leave the page.

How large can the HTML be?

Up to 1 MB in this free tool, and up to 5 MB with the API. The conversion has to finish within about 12 seconds.

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**.

More free tools

Start using our Screenshot API for free today!

Get 300 requests / month for free