Markdown to HTML Converter
Render GitHub-flavored Markdown to HTML with tables and strikethrough. Output is sanitized by default to strip scripts and event handlers.
Result
Press “Run” to see the result.
Send Markdown in the markdown field (JSON, form or query string) or as a raw text body and receive the rendered HTML in html. Rendering uses the marked parser with GitHub-flavored Markdown enabled: tables, strikethrough, autolinks and fenced code blocks are supported. Set breaks=true to turn single line breaks into <br>.
Because Markdown can contain raw HTML, the output is sanitized by default: script, style, iframe, object, embed, form and similar elements are removed, as well as on* event handlers, style attributes and javascript: / vbscript: / data:text URLs. Pass sanitize=false only when the Markdown comes from a trusted source.
The request body is limited to 1 MB and the markdown field to 2,000,000 characters.
Use this in your code
curl -X POST "https://apibox.io.vn/v1/markdown-to-html" \
-H "Authorization: Bearer YOUR_API_KEY" \
-H "Content-Type: application/json" \
-d '{"markdown":"# Release notes\n\nVersion **2.0** adds [dark mode](https://example.com/dark).\n\n- Faster builds\n- ~~Old API~~ removed\n\n| Plan | Price |\n| --- | --- |\n| Free | $0 |"}'const res = await fetch('https://apibox.io.vn/v1/markdown-to-html', {
method: 'POST',
headers: {
Authorization: 'Bearer YOUR_API_KEY',
'Content-Type': 'application/json',
},
body: JSON.stringify({
"markdown": "# Release notes\n\nVersion **2.0** adds [dark mode](https://example.com/dark).\n\n- Faster builds\n- ~~Old API~~ removed\n\n| Plan | Price |\n| --- | --- |\n| Free | $0 |"
}),
});
const data = await res.json();
console.log(data);import requests
res = requests.post(
"https://apibox.io.vn/v1/markdown-to-html",
headers={"Authorization": "Bearer YOUR_API_KEY"},
json={"markdown": "# Release notes\n\nVersion **2.0** adds [dark mode](https://example.com/dark).\n\n- Faster builds\n- ~~Old API~~ removed\n\n| Plan | Price |\n| --- | --- |\n| Free | $0 |"},
timeout=30,
)
print(res.json())<?php
$ch = curl_init('https://apibox.io.vn/v1/markdown-to-html');
curl_setopt_array($ch, [
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => 'POST',
CURLOPT_HTTPHEADER => ['Authorization: Bearer YOUR_API_KEY', 'Content-Type: application/json'],
CURLOPT_POSTFIELDS => '{"markdown":"# Release notes\\n\\nVersion **2.0** adds [dark mode](https://example.com/dark).\\n\\n- Faster builds\\n- ~~Old API~~ removed\\n\\n| Plan | Price |\\n| --- | --- |\\n| Free | $0 |"}',
]);
$response = curl_exec($ch);
print_r(json_decode($response, true));API documentation → Get a free API key
FAQ
Is the generated HTML safe to insert into a page?
By default yes for common attacks: scripts, iframes, forms, event handlers, style attributes and javascript: links are removed. Disable with sanitize=false only for trusted input.
Does it support GitHub-flavored Markdown tables?
Yes. GFM is enabled, so pipe tables, ~~strikethrough~~ and autolinks are rendered.
How do I keep single line breaks?
Set breaks=true. Each newline inside a paragraph then becomes a <br> tag, like on GitHub comments.