Skip to main content

Convert Markdown to PDF

ConvertConvert Markdown to PDF

The Convert Markdown to PDF API converts Markdown into a PDF. You send the Markdown as Base64 (docContent), docName (e.g. sample.md), mdFilePath (path inside ZIP if using ZIP; empty for single file), and IsAsync. The API returns the PDF (or 202 + Location for async). Use the tester below to try it; more details are in the sections that follow.

Try the Convert Markdown to PDF API

:::note Quick reference Endpoint: POST /api/v2/ConvertMdToPdf · Required: api-key, docContent, docName, mdFilePath, IsAsync :::

:::info Try it live Use the form below to send your API key and Markdown (Base64). Set doc name and md file path; the response is the PDF (or polling URL when async). No code required—fill the fields and click Send request. :::

Loading API Tester...

Overview, parameters, and use cases

What is Convert Markdown to PDF?

This endpoint converts Markdown content into a PDF. You provide the Markdown (Base64; single file or ZIP with mdFilePath for path inside ZIP), docName (e.g. sample.md), mdFilePath (empty for single file), and IsAsync. The API preserves headers, lists, code blocks, and links. Returns the PDF or a Location URL for async.

Key features

  • Single or ZIP – One Markdown file or ZIP with mdFilePath for path inside ZIP.
  • Formatting – Preserves headers, lists, code blocks, links.
  • AsyncIsAsync returns 202 with Location URL for polling.

:::tip Best for Use when you need PDFs from Markdown (docs, README, technical writing). For HTML use Convert HTML to PDF; for URL use Convert URL to PDF. :::

Prerequisites

Before using this endpoint, make sure you have:

Response Format

The API returns a PDF document:

  • Status 200: Markdown to PDF conversion completed immediately - binary PDF content in response body
  • Status 202: Request accepted and processing asynchronously - use the Location header URL to poll for results

For asynchronous requests, poll the Location URL until status 200 is returned with the PDF document.

Get Help