HTML to Markdown Converter API
Convert HTML to clean, deterministic Markdown. Strips scripts, styles, layout noise. Preserves structure (headings, lists, tables, links, code). Handles malformed HTML. CMS exports, scrapers, WYSIWYG editors → GitHub-flavored Markdown. Stateless, 25MB max.
Why use this API?
HTML from many sources is bloated and inconsistent. Get deterministic, clean Markdown for docs, search, or LLM pipelines without maintaining per-language libraries.
What the API does
POST /convert with JSON { "html": "...", "mode": "readable" } or raw text/html body. Returns { "markdown": "..." }.
Request & response schema
View request schema · View response schema · View error & warning codes
Try it in the playground
Add your RapidAPI key and run. Key is sent only to RapidAPI.
Copy code
Host: html-to-markdown-converter1.p.rapidapi.com, endpoint: POST /health. Choose language:
curl --request POST \
--url 'https://html-to-markdown-converter1.p.rapidapi.com/health' \
--header 'Content-Type: application/json' \
--header 'x-rapidapi-host: html-to-markdown-converter1.p.rapidapi.com' \
--header 'x-rapidapi-key: YOUR_RAPIDAPI_KEY' \
--data '{
"html": "<h1>Hello</h1><p>World <strong>bold</strong></p>",
"mode": "readable",
"includeMetadata": false
}'const res = await fetch('https://html-to-markdown-converter1.p.rapidapi.com/health', {
method: 'POST',
headers: {
'Content-Type': 'application/json',
'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
'x-rapidapi-host': 'html-to-markdown-converter1.p.rapidapi.com'
},
body: '{ "html": "<h1>Hello</h1><p>World <strong>bold</strong></p>", "mode": "readable", "includeMetadata": false }'
});
const data = await res.json();
console.log(data);import http.client
import json
conn = http.client.HTTPSConnection("html-to-markdown-converter1.p.rapidapi.com")
payload = '{
"html": "<h1>Hello</h1><p>World <strong>bold</strong></p>",
"mode": "readable",
"includeMetadata": false
}'
headers = {
'Content-Type': 'application/json',
'x-rapidapi-key': 'YOUR_RAPIDAPI_KEY',
'x-rapidapi-host': 'html-to-markdown-converter1.p.rapidapi.com'
}
conn.request("POST", "/health", payload, headers)
res = conn.getresponse()
print(res.read().decode())HttpRequest request = HttpRequest.newBuilder()
.uri(URI.create("https://html-to-markdown-converter1.p.rapidapi.com/health"))
.header("Content-Type", "application/json")
.header("x-rapidapi-key", "YOUR_RAPIDAPI_KEY")
.header("x-rapidapi-host", "html-to-markdown-converter1.p.rapidapi.com")
.method("POST", HttpRequest.BodyPublishers.ofString("{
\"html\": \"<h1>Hello</h1><p>World <strong>bold</strong></p>\",
\"mode\": \"readable\",
\"includeMetadata\": false
}"))
.build();
HttpResponse<String> response = HttpClient.newHttpClient().send(request, HttpResponse.BodyHandlers.ofString());
System.out.println(response.body());What to expect
Response format depends on the endpoint. Use your RapidAPI key in headers. Stateless; no data stored. See RapidAPI docs for full response schema.
About this API
Who Should Use This API
Content pipelines, docs tools, and teams converting HTML to Markdown.
Also Known As
HTML to Markdown API, HTML converter, GFM converter.
HTML to Markdown Converter API
Convert HTML from CMS exports, scrapers, WYSIWYG editors, and web pages into clean, deterministic GitHub-flavored Markdown. One canonical conversion service—no per-project libraries or configuration. Same input always yields the same output.
What This API Does
- **Converts** HTML (full document, fragment, or inline) into Markdown
- **Strips** scripts, styles, event handlers, tracking attributes, and layout-only markup
- **Preserves** headings, paragraphs, lists, tables, links, images, code blocks, blockquotes
- **Handles** malformed or partial HTML with best-effort parsing
- **Supports** three modes: strict (minimal), readable (default), llm-friendly (link references)
- **Returns** Markdown plus optional metadata (character counts, tags removed)
No URL fetching. No script execution. No data persistence. Stateless. 25MB max per request.
Key Features
- **Deterministic** — Same HTML + options → same Markdown every time
- **GitHub-Flavored Markdown** — Tables, fenced code blocks, standard syntax
- **Clean Output** — Strips scripts, inline styles, data-* attributes, javascript: links
- **Malformed HTML** — Handles unclosed tags, invalid nesting, partial fragments
- **Conversion Modes** — strict, readable, llm-friendly for different use cases
- **Stateless** — No storage, no logging, no cross-request memory
Use Cases
- **CMS Migration** — Convert WordPress, Notion, or custom CMS HTML exports to Markdown
- **Scraper Pipelines** — Normalize scraped HTML before analytics, search, or storage
- **WYSIWYG Output** — Convert TinyMCE, Quill, or editor HTML to version-controlled Markdown
- **LLM Pipelines** — Feed clean Markdown to embeddings, RAG, or prompt context
- **Documentation** — Migrate HTML-based docs to Markdown for GitHub, Notion, or static sites
- **Email Processing** — Extract readable content from HTML emails
Who This Is For
### Backend Engineers
Ingest HTML from APIs or scrapers and convert to Markdown in one API call. Replace ad-hoc parsing with a canonical service.
### Data Engineers
Prepare HTML content for analytics, search indexing, or ML pipelines. Clean, structured text without layout noise.
### Documentation Teams
Migrate HTML-based documentation to Markdown. Consistent output across sources and tools.
### CMS Migration Teams
Convert exports from WordPress, Drupal, or custom CMS into Markdown for new platforms.
### LLM Pipeline Builders
Convert HTML to clean text for embeddings, RAG, or prompt context. Predictable structure and chunk boundaries.
### Product Teams
Normalize WYSIWYG editor output (TinyMCE, Quill, CKEditor) into Markdown for storage or display.
Frequently Asked Questions
-
No. Fully stateless.
-
Common tags; output is GitHub Flavored Markdown.