Markdown (MD) to HTML Converter API - ApyHub - ApyHub

Convert Markdown to HTML files API

ApyHub
ApyHub
verified icon
50 atoms

About

The Markdown to HTML API lets you upload and transform Markdown files into HTML with minimal loss of formatting. Markdown is perfect for writing documentation, notes, or content quickly, but converting it to HTML ensures your content renders correctly across all browsers and devices.
This API is ideal for developers looking to automate and streamline documentation workflows. Common use cases include:
  • Converting project documentation or README files into HTML for websites or dashboards
  • Generating static site content from Markdown files in web apps
  • Automating blog or article publishing by transforming Markdown posts into HTML
  • Ensuring consistent styling and structure across multiple pages or web projects
While Markdown is great for simple text formatting, converting it to HTML enhances functionality, accessibility, and compatibility, making your content ready for any web environment.
Try out the Markdown to HTML API in the API playground for free, improve your document workflow, and reduce HTML conversion errors with a single API call.
Select API Endpoints
Input
Output

API Playground

API Documentation

upload file: download file
POST
https://api.apyhub.com/convert/md-file/html-file

Request example

1
curl --location --request POST 'https://api.apyhub.com/convert/md-file/html-file?output=test-sample' \
2
--header 'apy-token: {{token}}' \
3
--form 'file=@"test.md"'
The method lets you pass a Markdown file and returns the converted html file as a parameter. This is the most straight forward way to use this service - submit a markdown file and receive the generated HTML file as a response.
Method: POST
Content Type: multipart/form-data
Query Parameter(s)
AttributeTypeMandatoryDescription
outputStringNoThe name of the HTML file for the converted document. If the output attribute is not provided, the default file name will be output.html.
Request Body
AttributeTypeMandatoryDescription
fileFileYesThe markdown file that will be used as input.

HTTP Response Codes

The method may return one of the following HTTP status codes:
Status CodeDescription
200The request was successful.
400Request is invalid or file is not accessible.
401Required authentication information is either missing or not valid for the resource.
500There was an error in processing this request.

Authentication

All API requests to ApyHub services need to be authenticated. Currently we support tokens or basic authentication mechanisms. You can generate and view your existing credentials from your workspace settings (on the left side of the navbar) and go to “API Keys".
Points to note:
  • Credential secrets are generated on the fly and are not stored in plain text, so on generating a credential please save the secrets somewhere safe.
  • Use the apy-token as the header parameter to pass the token.
  • Use the Authorization header to send the basic authentication credentials.

Error codes

1
{
2
"error": {
3
"code": 105,
4
"message": "Invalid URL"
5
}
6
}
To search for a specific error code, enter the code in the search box below. Alternatively, you can click on the button to view a complete list of all error codes.
Table of contents
AboutAPI PlaygroundAPI DocumentationAuthenticationError codesRelated Utility APIsRelated Articles