HTML to Markdown API - Convert HTML to Clean Markdown
Converts common HTML elements to Markdown: h1-h6 → # through ######, <pre><code> → fenced code blocks, <ul>/<ol> → bullet/numbered lists, <a> → [text](url), <img> → , <strong>/<b> → **bold**, <em>/<i> → *italic*, <blockquote> → > quote, <hr> → ---. HTML entities are decoded.
Code examples
curl -X POST https://api.botoi.com/v1/html-to-markdown \
-H "Content-Type: application/json" \
-d '{"html":"<h1>Hello</h1><p>Visit <a href=\"https://github.com\">GitHub</a>.</p>"}'When to use this API
Migrate content from CMS exports to Markdown
WordPress and Ghost exports give you HTML posts. Convert each post to Markdown so you can commit them to a Git-based site (Astro, Hugo, Next.js) without manual rewrites.
Email to newsletter pipeline
Transactional email services often return HTML versions of your newsletters. Convert to Markdown to publish the same content on your blog without formatting drift.
Save HTML responses as notes
When scraping articles with /v1/url-metadata or a headless browser, convert the extracted content to Markdown for storage. Markdown is smaller, grep-able, and plays well with AI workflows.
Frequently asked questions
What HTML elements are supported?
Does it handle tables?
How are nested lists handled?
Are HTML entities preserved?
What about scripts and styles?
Get your API key
Free tier includes 5 requests per minute with no credit card required. Upgrade for higher limits.