DEVELOPER · API · MARKDOWN

HTML to Markdown API:
call it free, right now

Most conversion APIs want a credit card before they return a single heading. This one doesn't: POST your HTML as JSON and get clean Markdown back — no key, no account, nothing to install.

Updated August 2026 · 4 minute read

Check any page for GDPR & cookie issues: Run the Free Scanner →
Ask any EU compliance question — EAA, NIS2 or GDPR — and get a practical answer in seconds: 🤖 Ask the Compliance AI →

Why a REST API for this?

You already know how to turn HTML into Markdown by hand: paste it into a converter tab, copy the result back. That works once. It does not work when the conversion lives inside a script, a build step, an LLM pipeline or a cron job.

🤖 Feeding LLMs

Models read Markdown far better than raw HTML. Strip tags and noise before you send pages into a prompt — fewer tokens, fewer distractions, better answers.

📚 Content pipelines

Pull documentation, changelogs or articles from anywhere and land them in your CMS, wiki or static site as clean Markdown files.

🔗 Glue scripts

One curl from bash, one requests.post() from Python, one fetch() from Node. If it can speak HTTP, it can use it.

Your options today

OptionHow it worksCatch
Commercial APIs Full-featured extraction endpoints API keys, monthly fees, rate limits on free tiers
Self-hosted libraries turndown, html2text, etc. You own the install, edge cases and maintenance
Online converters Paste HTML into a form Manual only — cannot be called from a script
Clean Copy API Plain REST: POST HTML, get Markdown. No key, no fee Max 50 KB input; be gentle (≤10 req/s)

Quickstart in 30 seconds

The endpoint is POST /api/clean-copy. Send a JSON object with an html field; get JSON back with a markdown field.

curl

curl -s -X POST https://hermes-passiv.pages.dev/api/clean-copy \
  -H 'Content-Type: application/json' \
  -d '{"html":"<h1>Hello</h1><p>This is <b>bold</b>.</p>"}'
{"ok":true,"markdown":"# Hello\n\nThis is **bold**.","mode":"markdown","input_chars":44,"output_chars":22}

Python

import requests

r = requests.post(
    "https://hermes-passiv.pages.dev/api/clean-copy",
    json={"html": open("page.html").read()},
    timeout=15,
)
print(r.json()["markdown"])

Node (no dependencies)

const res = await fetch("https://hermes-passiv.pages.dev/api/clean-copy", {
  method: "POST",
  headers: { "Content-Type": "application/json" },
  body: JSON.stringify({ html: "<h2>Docs</h2><p><a href='/'>home</a></p>" }),
});
const { markdown } = await res.json();

Convert a live URL instead of raw HTML

curl -s -X POST https://hermes-passiv.pages.dev/api/clean-copy \
  -H 'Content-Type: application/json' \
  -d '{"url":"https://example.com/article"}'

The API fetches the page server-side, extracts the main content and returns it as Markdown — handy when you don't have the HTML locally yet.

Options that matter

FieldValuesWhat it does
htmlstringRaw HTML input (max 50 KB). Required unless you pass url.
urlstringFetches the page server-side and converts it.
modemarkdown | textMarkdown output, or stripped plain text.

# Headings preserved

H1–H6 map to the right number of #, so document structure survives.

[Links](intact)

Links become standard Markdown references with original URLs.

Tables → pipe tables

Simple HTML tables become Markdown pipe tables, alignment included.

🗑️ Noise stripped

Scripts, styles, tracking pixels and hidden junk are removed automatically.

Frequently asked questions

Is it really free?

Yes — no key, no account, no card. The limits are technical, not commercial: 50 KB of HTML per request and a soft cap of 10 requests per second.

What happens if my HTML is too big?

The API answers with an error message telling you so. Split the document and send the parts — headings and links keep working across calls since conversion is stateless.

Do you store my content?

No. Conversion is stateless: your HTML is processed for the response and not kept.

Prefer running it locally?

Same engine ships offline as the Clean Copy CLI, as a browser extension, and as an npm library — see Clean Copy.

Open the full API reference →

Related: HTML to Markdown from the Terminal · HTML to Markdown Converter (online) · URL to Markdown Converter · Try it in the browser

Dansk version af denne guide

Keeping websites online? DeskUptime is a free desktop uptime & SSL-expiry monitor for macOS, Linux and Windows.