xtract.bot

Markdown → HTML

Try it interactively →
POST /api/md-to-html

Render CommonMark Markdown to HTML. Output is the rendered body only (no `<html>` shell) — drop it directly into your page or feed it through your sanitiser.

Converts Markdown source to HTML following the CommonMark specification. Output is the rendered HTML body only — no `<html>` / `<head>` / `<body>` shell — so you can drop it directly into your page template. GFM extensions (tables, strikethrough, task lists) are not yet enabled in this build. Plain CommonMark headings, paragraphs, lists, blockquotes, code fences, links, and emphasis all work. For untrusted input, run the output through `html-sanitize` before embedding it in your page.

Inputs

NameTypeDefaultDescription
markdown*fileThe Markdown source document.

Response

Modes: text, json. Cache: yes (24h TTL).

Code samples

Built from the hello example.

# Download or substitute the example input:
#   curl -O https://xtract.bot/examples/md-to-html/hello.md
MARKDOWN=$(base64 -w0 < hello.md)

curl -X POST https://api.xtract.bot/api/md-to-html \
  -H "Content-Type: application/json" \
  -H "Accept: text/plain" \
  -H "X-Account-Id: $XTRACT_ACCOUNT_ID" \
  -H "X-Api-Key: $XTRACT_API_KEY" \
  -d '{
  "markdown": "'"$MARKDOWN"'"
}'