Data Conversion · REST API

HTML to Markdown & Markdown to HTML API

Convert structured HTML into readable Markdown and Markdown into sanitized HTML through two dedicated REST endpoints.

Free tier available. Both endpoints require a JWT Bearer Token.

Conversion capabilities

Semantic HTML

Convert headings, lists, links, code blocks and tables into readable Markdown.

Sanitized HTML output

Convert raw Markdown into sanitized HTML for documentation and previews.

Optional CSS themes

Choose NONE, LIGHT or DARK when converting Markdown to HTML.

Convert HTML to Markdown

Convert structured HTML into readable Markdown. Common elements such as headings, lists, links, code blocks and tables are supported.

Endpoint

POST /api/v1/convert/data/html-to-md

Input: text/plain · Output: text/markdown

Short example

Input

<h1>Hello World</h1>
<p>This is a <strong>HTML</strong> example.</p>
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>

Output

# Hello World

This is a **HTML** example.

- Item 1
- Item 2

Conversion is structural: HTML is not executed, rendered or sanitized. Unsupported or unsafe elements and CSS are ignored. Send the raw input unchanged as text/plain.

HTML to Markdown in Swagger

Convert Markdown to HTML

Convert raw Markdown into sanitized HTML, optionally applying a predefined CSS theme.

Endpoint

POST /api/v1/convert/data/md-to-html

Input: text/plain · Output: text/html

Short example

Input

# Hello World

This is **Markdown** example.

- Item 1
- Item 2

Output

<h1>Hello World</h1>
<p>This is <strong>Markdown</strong> example.</p>
<ul>
  <li>Item 1</li>
  <li>Item 2</li>
</ul>

Optional query parameter

Markdown to HTML theme parameter
ParameterAllowed valuesDefault
themeNONE, LIGHT, DARKNONE

Use ?theme=LIGHT or ?theme=DARK to apply a predefined CSS theme. Omit the parameter for NONE.

The generated HTML is sanitized. Send raw Markdown as text/plain without client-side modifications.

Markdown to HTML in Swagger

When to use these APIs

Documentation migration

Migrate HTML documentation and WYSIWYG content to versionable Markdown.

Markdown previews

Generate sanitized HTML previews of README files and Markdown documentation.

Explore more DevHub APIs

Browse the API catalog or consult interactive documentation for request and response details.

loader