Markdown-to-PDF API for reports, docs, and READMEs

Convert Markdown to PDF with one REST call. Send CommonMark or GitHub Flavored Markdown (GFM), pick one of 11 built-in templates or bring your own CSS and HTML, and get a print-ready PDF back. Free to try, no credit card.


Three steps

How to convert Markdown to PDF

Every conversion is a single POST to the Processor API md_to_pdf endpoint. The response body is the PDF.

Get an API key

Create a free account and copy the key from the dashboard. No credit card.


Post the Markdown

Send JSON with a markdown string, a raw text/markdown body, or a multipart request with images and fonts.


Save the PDF

The response is the finished PDF. Write it to disk, store it, or stream it to the user.


Try it out

This example will convert inline Markdown to a styled PDF using the default template.


Try it out in three steps

  1. Replace your_api_key_here with your Nutrient API key.
  2. Run the code from your terminal or project folder.
  3. Open result.pdf to view the generated document.
curl -X POST https://api.nutrient.io/processor/md_to_pdf \
-H "Authorization: Bearer your_api_key_here" \
-H "Content-Type: application/json" \
-o result.pdf \
--fail \
-d '{
"markdown": "# Hello World\n\nThis is **bold** and *italic*.\n\n- Item one\n- Item two",
"template": "built-in:default"
}'

Start now

Create an account to access your API key and start with $5 of free usage every month

Start building with DWS Processor API in minutes — no payment information required.

Already have an account? Sign in →

Markdown to styled PDF in one call

Send Markdown and receive a production-ready PDF. Choose from 11 built-in templates, or provide custom CSS and HTML templates for full control over the output.

CommonMark and GFM support

Full CommonMark compliance with GitHub Flavored Markdown extensions: tables, task lists, alerts, footnotes, strikethrough, highlights, and syntax-highlighted code blocks.

Flexible input, consistent output

Send JSON with inline Markdown, upload raw .md files, or use multipart for Markdown with images and custom fonts. Control page size, orientation, and margins.


Templates, CSS, and layout

Control how the PDF looks

Pick a template with the template parameter: eight built-in: report templates (built-in:default, built-in:minimal, built-in:corporate, built-in:elegant, built-in:executive, built-in:nordic, built-in:nordic-report, built-in:technical) and three presentation templates with larger type. Append your own rules with css; set page size, orientation, and margins with layout; and choose a code theme with markdown_options.syntax_highlight. For complete control, upload an HTML template with a {{content}} placeholder. See the template reference for page sizes and fonts.

Request body
{
"markdown": "# Q3 report\n\n| Region | Revenue |\n| --- | ---: |\n| EMEA | 1.2M |\n| NA | 2.4M |",
"template": "built-in:corporate",
"css": "h1 { color: #1a3b6e; }",
"layout": {
"orientation": "landscape",
"margin": { "top": 20, "bottom": 20 }
},
"markdown_options": {
"syntax_highlight": { "theme": "github" }
}
}

Where it fits

Markdown in, PDF out, inside your own pipeline

Markdown is what documentation tools, note apps, and large language models write. PDF is what customers, auditors, and printers accept. The API sits between the two, without a headless browser, a LaTeX install, or a Pandoc toolchain on your servers. Pair it with the PDF-to-Markdown API to go the other way: parse a PDF, edit or summarize the Markdown, and render it back to PDF.

Markdown files such as a report, release notes, and an invoice rendered by the API into a PDF briefing

Reports from LLMs and agents

Turn reports and briefings an LLM or agent drafted in Markdown into PDFs.

Documentation and release notes

Export documentation, READMEs, release notes, and changelogs as PDF.

Invoices and statements

Render invoices and statements from templated Markdown.

Knowledge base articles

Package knowledge base articles as PDFs for offline distribution.


Used by Lufthansa, Disney, Autodesk, UBS, Dropbox, IBM
Lufthansa
Disney
Autodesk
UBS
Dropbox
IBM

Getting started

Implementation options

The Markdown-to-PDF API supports built-in templates, custom CSS overrides, uploaded images and fonts, and full HTML template control. Follow these steps in the guide to go from a basic conversion to a fully customized document.



Frequently asked questions

What is a Markdown-to-PDF API?

Nutrient’s Markdown-to-PDF API converts Markdown text or .md files into PDF documents with a single REST call. It’s part of the Processor API, so it runs in Nutrient’s cloud and returns a finished PDF: no browser automation, LaTeX, or Pandoc to install and maintain.

How do I convert Markdown to PDF programmatically?

Post the Markdown to https://api.nutrient.io/processor/md_to_pdf with your API key, and save the response body as a PDF. The samples on this page do it in shell, Windows shell, Python, JavaScript, Java, C#, and PHP. For options such as templates, CSS, page layout, and uploaded assets, read the Markdown-to-PDF guide.

Does it support GitHub Flavored Markdown tables and task lists?

Yes, Nutrient’s Markdown-to-PDF API is CommonMark compliant and supports the GFM extensions: pipe tables with column alignment, task lists, strikethrough, autolinks, alerts, footnotes, superscript, subscript, highlights, and description lists. Fenced code blocks get syntax highlighting.

Can I style the PDF?

Yes. Choose one of 11 built-in templates (eight report styles and three presentation styles), append custom CSS with the css parameter, set page size, orientation, and margins with layout, and pick a syntax-highlighting theme. Custom fonts and images are uploaded as multipart assets and referenced by file name. See the template reference.

Can I use my own HTML template?

Yes. Send an HTML template as the html part of a multipart request. The rendered Markdown is inserted at the {{content}} placeholder, and any uploaded stylesheets, fonts, or images can be referenced from the template. When an HTML template is used, the css parameter is ignored. See custom HTML templates.

How is this different from Pandoc or md-to-pdf?

Pandoc and the md-to-pdf npm package run on your machine and need a LaTeX distribution or a headless browser. Nutrient’s API runs the conversion in the cloud and returns a PDF over HTTPS, so there’s nothing to install on servers or in CI, and output is the same from every environment. Choose a local tool when the documents never leave your laptop; choose the API when conversions run inside an application, a pipeline, or an AI agent.

Can an AI agent call the Markdown-to-PDF API?

Yes. Agents call the Markdown-to-PDF endpoint directly over HTTPS with the same API key, from a script, a skill, or a tool definition. Nutrient MCP covers the build-based Processor operations and Data Extraction, not this endpoint. Markdown is the format most models write, so the API is a direct path from a generated draft to a shareable PDF.

Is there a free Markdown-to-PDF API?

Yes. A free Nutrient account includes an API key and $5 of usage every month to test the Markdown-to-PDF API, with no credit card required. Paid plans are listed on the API pricing page.

Security is our top priority

SOC 2 Type 2 audited

Nutrient’s infrastructure is SOC 2 Type 2 audited and GDPR compliant. See our privacy policy and security documentation for details on data handling.

HTTPS encryption

All communication between your application and Nutrient is done via HTTPS to ensure your data is encrypted when it’s sent to us.

Safe payment processing

All payments are handled by Paddle. Nutrient DWS Processor API never has direct access to any of your payment data.

Ready to try it?

Create an account to get your DWS Processor API key and start making API calls.