Markdown to HTML

Convert Markdown text to HTML in a single API call. Optionally sanitize the output to strip unsafe tags and prevent XSS.

Get API Key

Overview

Use Cases

  • Rendering user-generated Markdown content safely in web apps
  • Converting README files or documentation to HTML
  • Building rich-text editors with Markdown input and HTML preview
  • Preprocessing Markdown before storing rendered HTML

Features

Full CommonMark Markdown support
Optional HTML sanitization to strip unsafe tags and attributes
Returns ready-to-render HTML string

API Endpoints

Convert Markdown to HTML

Converts a Markdown string to HTML. Pass sanitize true to strip potentially unsafe tags like script and iframe from the output.

POST
https://api.requiems.xyz/v1/convert/markdown

Parameters

Name Type Required Description
markdown string Required The Markdown text to convert.
sanitize boolean Optional When true, sanitizes the HTML output to remove unsafe tags and attributes.

Try it out

Live Demo
Request

The Markdown text to convert.

When true, sanitizes the HTML output to remove unsafe tags and attributes.

Response Fields

Field Type Description
html string The rendered HTML output

Code Examples

curl -X POST https://api.requiems.xyz/v1/convert/markdown \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown": "# Hello\n\nThis is **bold** text.", "sanitize": true}'

Error Responses

422

unprocessable_entity

Frequently Asked Questions