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://requiems.xyz/v1/technology/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://requiems.xyz/v1/technology/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

Convert Markdown Batch

Converts multiple Markdown strings into HTML in a single request. Results are returned in the same order as the input array. Supports optional sanitization to remove unsafe HTML tags such as script and iframe.

POST
https://requiems.xyz/v1/technology/markdown/batch

Parameters

Name Type Required Description
markdowns array<string> Required Array of Markdown strings. Min: 1, Max: 50.
sanitize boolean Optional When true, sanitizes HTML output to remove unsafe tags and attributes.

Try it out

Live Demo
Request

Array of Markdown strings. Min: 1, Max: 50.

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

Response Fields

Field Type Description
results array<object> One HTML result per Markdown input, preserving input order
results[].html string Rendered HTML output for each Markdown string

Code Examples

curl -X POST https://requiems.xyz/v1/technology/markdown/batch \
  -H "requiems-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{
    "markdowns": ["# Hello", "**bold**", "- item"],
    "sanitize": true
  }'

Error Responses

validation_failed

Body is invalid: empty array, more than 50 items, or invalid Markdown entry.

bad_request

Missing or malformed request body.

internal_error

Unexpected server error.

Frequently Asked Questions