Markup Convert
Convert between markup formats (Markdown, HTML, plain text).
/v1/convert/markup
curl "https://convert.toolkitapi.io/v1/convert/markup?url=https://toolkitapi.io/doc.md&from_format=markdown&to_format=html"
import httpx
resp = httpx.get(
"https://convert.toolkitapi.io/v1/convert/markup?url=https://toolkitapi.io/doc.md&from_format=markdown&to_format=html",
)
print(resp.json())
const resp = await fetch("https://convert.toolkitapi.io/v1/convert/markup?url=https://toolkitapi.io/doc.md&from_format=markdown&to_format=html", {
});
const data = await resp.json();
console.log(data);
# See curl example
{
"result": "<h1>Hello</h1>\n<p>World</p>",
"metadata": {"word_count": 2, "toc": [{"level": 1, "text": "Hello"}]}
}
Try It Live
Description
How to Use
1. Call this endpoint with `from_format`, `to_format`, and either `content` (inline) or `url`.
2. Optionally set flags: `gfm` for GitHub Flavored Markdown, `sanitize` for HTML safety, `preserve_links` and `preserve_tables` for text output.
3. Read the `result` string from the response.
About This Tool
Markup Convert is the unified endpoint for moving between `markdown`, `html`, and plain `text`. Supply inline `content` or a public `url`; the result is returned as a JSON `result` string together with `metadata` (word count, table of contents, etc.).
Conversions support GitHub Flavored Markdown, HTML sanitization, and options to preserve links and table structure when downgrading to plain text.
Why Use This Tool
- CMS ingestion — Normalize Markdown contributions into safe, sanitized HTML
- Newsletter pipelines — Turn HTML posts into Markdown drafts
- Search indexing — Extract plain text from HTML for full-text indexes
- Content migration — Move between Markdown-based and WYSIWYG systems
Frequently Asked Questions
Is the HTML output safe to render?
What Markdown flavour is used?
Can I convert plain text to Markdown?
Start using Markup Convert now
Get your free API key and make your first request in under a minute.