Cogwork APIs

Free Markdown → PDF Converter

Paste Markdown, get a clean PDF. No signup. Same engine as the DocForge API.

Markdown

PDF preview

Your PDF appears here.

Need this in your app or AI agent?

One call returns a PDF. Free tier: 50 PDFs/month — then $5/mo for 1,000, up to 60,000 on higher plans. Also available as an MCP tool agents can call.

POST /pdf { "markdown": "# Hello" }
Get an API key →

DocForge is a document API focused on one job done well: reliable Markdown-to-PDF with real pagination and clean typography, so you can ship invoices, reports, and statements without bundling a headless browser or a PDF library into your own stack. The free converter below is the same engine the API runs.

How it works

Type or paste Markdown and DocForge converts it to a clean, print-ready PDF: headings, tables, lists, code blocks, and emphasis are rendered with sensible typography and real page breaks. The tool above calls the same POST /pdf endpoint the API exposes, so you can move from prototyping here to one HTTP request in production without any change in output.

Use cases

FAQ

What Markdown is supported?
Standard Markdown plus tables, fenced code blocks, blockquotes, ordered/unordered lists, and inline emphasis — the same syntax shown in the editor above.
Which page sizes can I use?
A4, Letter, Legal, A3, and A5. Pick a format in the dropdown, or pass "format" in the API request body.
Is it free?
Yes — free to use here, no signup. The DocForge API has a free tier of 50 PDFs/month; paid plans start at $5/mo for 1,000 and scale to 60,000.
Can AI agents call it?
Yes. DocForge is also available as an MCP tool, so assistants can generate a PDF as a single tool call.

API reference

Call it through RapidAPI. Base host: docforge-markdown-to-pdf.p.rapidapi.com. Send your key as X-RapidAPI-Key and the host as X-RapidAPI-Host.

POST/pdf

Convert Markdown (or raw HTML) into a paginated PDF. Returns a JSON { url } by default; set json:false for raw PDF bytes. Max input 500 KB.

FieldTypeDescription
markdownone requiredstringMarkdown source (tables, code, lists, emphasis supported).
htmlone requiredstringRaw HTML instead of Markdown.
cssoptstringExtra CSS appended to the built-in print stylesheet.
formatoptstringA4 (default), Letter, Legal, A3, or A5.
landscapeoptbooleanLandscape orientation (default false).
marginoptstringPage margin, e.g. 20mm (default).
jsonoptbooleantrue (default) → { url }; false → raw PDF bytes.

Returns { url, cached } pointing to the PDF on the CDN (or the raw PDF when json:false).

curl -X POST "https://docforge-markdown-to-pdf.p.rapidapi.com/pdf" \
  -H "content-type: application/json" \
  -H "X-RapidAPI-Key: YOUR_KEY" \
  -H "X-RapidAPI-Host: docforge-markdown-to-pdf.p.rapidapi.com" \
  -d '{"markdown":"# Invoice 1024\n\nThanks for your business.","format":"A4"}'