# Markdown to HTML API

> Markdown to HTML is a markdown converter API that parses markdown syntax and converts it to clean, semantic HTML suitable for web rendering and content management.

**Endpoint:** `POST https://api.apiverve.com/v1/markdowntohtml`  
**Category:** Data Conversion  
**Cost:** 1 credit per call  
**Canonical page:** https://apiverve.com/marketplace/markdowntohtml

## Overview

A markdown to HTML API for any markdown conversion step in your stack: POST the markdown text and get the rendered HTML back in JSON. Perfect for CMSs, blog platforms, documentation sites, and any application requiring markdown content rendering in HTML format.

## Authentication

Every call carries your key in an `x-api-key` header. The same key works across the whole
APIVerve catalog — there are no per-API subscriptions. Responses always use the same three
top-level keys: `status`, `error`, and `data`.

## Example request

```bash
curl -X POST "https://api.apiverve.com/v1/markdowntohtml" \
  -H "x-api-key: YOUR_API_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# Hello World\n\nThis is a **bold** statement and this is *italic*.\n\n## Features\n\n- Easy to use\n- Fast conversion\n- Supports common markdown syntax\n\n[Link to example](https://example.com)"}'
```

## Parameters

| Parameter | Type | Required | Description |
| --- | --- | --- | --- |
| `markdown` | string | Yes | Markdown text to convert (max 500,000 characters); leading indentation and trailing spaces are kept. length 1-500000 |

## Response fields

- `html` — string · Converted markdown content as valid semantic HTML
- `markdownLength` — number · Character count of the input markdown text · (premium)
- `htmlLength` — number · Character count of the generated HTML output · (premium)

## Sample response

```json
{
  "status": "ok",
  "error": null,
  "data": {
    "html": "<h1>Hello World</h1>\n<p>This is a <strong>bold</strong> statement and this is <em>italic</em>.</p>\n<h2>Features</h2>\n<ul>\n<li>Easy to use</li>\n<li>Fast conversion</li>\n<li>Supports common markdown syntax</li>\n</ul>\n<p><a href=\"https://example.com\">Link to example</a></p>\n",
    "markdownLength": 185,
    "htmlLength": 272
  }
}
```

## Use cases

- **Content Management** — Convert markdown content to HTML for CMS platforms
- **Blog Rendering** — Render markdown blog posts as HTML for web display
- **Documentation Sites** — Convert markdown documentation to HTML for static site generators
- **Email Templates** — Generate HTML emails from markdown-formatted content

## SDKs

- **npm** — `npm install @apiverve/markdowntohtml` (https://www.npmjs.com/package/@apiverve/markdowntohtml)
- **NuGet** — `dotnet add package APIVerve.API.MarkdowntoHTML` (https://www.nuget.org/packages/APIVerve.API.MarkdowntoHTML)
- **Source** — https://github.com/apiverve/markdowntohtml-api

## More

- Full reference: https://docs.apiverve.com/ref/markdowntohtml
- Get an API key: https://dashboard.apiverve.com
- Full catalog: https://apiverve.com/marketplace
