Markdown to HTML API - HTML to Markdown, GFM, safe
markdown_html_converterConvert Markdown to HTML or HTML to Markdown in one call. No extra key or account needed. Markdown -> HTML: GitHub-style tables, task lists, strikethrough, fenced code with language class, heading ids + table of contents, link titles; XSS-safe by default (raw HTML in the Markdown is shown as text, javascript:/data: links become #), optional full HTML page. HTML -> Markdown: headings, lists, tables, code, links, images; scripts/styles dropped; mainContent=true keeps only the article (drops menus, footers, cookie banners) for clean LLM/RAG input. Auto-detects the direction from 'text'. Returns stats + token estimate, nothing stored, ~1-50 ms. For AI agents, CMS, newsletter and docs pipelines, n8n/Make. Free: 5 calls/day per IP. Paid: Radar API key (from €9/mo at https://radarbg.com/pricing#starter via X-API-Key) or $0.001/call via x402 at https://radarbg.com/x402/markdown-html-converter.
Example tool call
This call uses example arguments supplied in the tool’s input schema.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"markdown": "# Release notes\n\nVersion **2.1** is out. See [docs](https://example.com/docs \"Docs\").\n\n## Changes\n\n- [x] Faster search\n- [ ] Dark mode\n\n| Plan | Price |\n|---|---|\n| Free | $0 |\n| Pro | $9 |\n"
},
"name": "markdown_html_converter"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| to | No | Target format when you send 'text' | auto |
| toc | No | Markdown -> HTML: return the table of contents (level, text, id of every heading) | |
| html | No | HTML text to convert to Markdown (a whole page or a fragment, max 1,000,000 chars) | |
| text | No | Instead of markdown/html: any text; the direction is detected automatically (or set 'to') | |
| title | No | Markdown -> HTML with fullPage: page <title> (default = first H1) | |
| fullPage | No | Markdown -> HTML: return a complete HTML page (doctype, title, readable CSS) instead of a fragment | |
| markdown | No | Markdown text to convert to HTML (max 1,000,000 chars) | |
| mainContent | No | HTML -> Markdown: keep only the main article text (drops nav, footer, sidebars) |