Markdown Parser & Sanitizer

Markdown Parser & Sanitizer

Text and NLP
4.742 reviews
120ms

A powerful API that converts Markdown to sanitized HTML. Our intelligent parser supports GitHub Flavored Markdown, syntax highlighting, heading anchors, and robust XSS protection. Perfect for safely rendering user-generated content, blog posts, documentation, and comment systems.

GitHub Flavored Markdown
Syntax Highlighting
XSS Protection
Heading Anchors
Link Transformation
Customizable Sanitization
Metadata Extraction
Content Stats

API Playground

Test the API endpoints with different parameters and see the responses in real-time.

Convert Markdown to sanitized HTML using a GET request with query parameters

GET/api/markdown-parser/

Request Parameters

GET/api/markdown-parser/

Required Parameters1

string

The Markdown content to convert to HTML

Optional Parameters

8 available
boolean

Whether to sanitize the output HTML to prevent XSS attacks

boolean

Whether to add syntax highlighting to code blocks

boolean

Whether to add anchor links to headings for easier navigation

boolean

Whether to allow HTML tags in the Markdown input (sanitized by default)

boolean

Whether to render images in the output HTML

boolean

Whether to use GitHub Flavored Markdown (GFM) extensions

boolean

Whether to render line breaks as <br> tags

boolean

Whether to use SmartyPants to convert quotes, dashes, etc.

Sample Code

curl
1
2
3
4
5
6
7
8
9
curl -X GET "/api/markdown-parser/?markdown=# Hello World

This is **bold** and this is *italic*.

```javascript
console.log("Hello, world!");
```&sanitize=true&highlight_code=false&heading_anchors=false&allow_html=false&allow_images=true&github_flavored=true&breaks=false&smartypants=false" \
  -H "Content-Type: application/json" \
  -H "X-API-Key: YOUR_API_KEY"