Introducing markdowntopdf.dev: a free Markdown to PDF API
One endpoint. POST Markdown, get a typeset PDF back in milliseconds. No key, no signup, no watermark, and nothing stored.
Markdown has become the default way to write. Engineers write READMEs and runbooks in it, and language models answer in it. When an agent drafts a report, a quote or a letter, the draft is almost always Markdown.
The people who read those documents still want a PDF. Turning one into the other has always been more work than it should be: install Pandoc and a LaTeX engine, run a headless browser, or pay an HTML to PDF service by the document and write an HTML template first.
Today we're releasing markdowntopdf.dev, a free API that does it in one call.
curl --data-binary @README.md https://markdowntopdf.dev/pdf -o README.pdf
That's the whole integration. There's no key and no signup, and the PDF has no watermark.
Fast enough to call inline
A one-page document renders in as little as 50 ms. Our one-page test invoice takes about 55 ms round trip over the internet. That's fast enough to generate the PDF while the user waits, rather than queuing a job and emailing a link later.
Rendering documents quickly is what we do all day for the CloudRaker API. markdowntopdf.dev is that work, pointed at the simplest input there is.
Make it yours
The default is a clean black and white A4 document set in Inter. Every option is optional, and you send them as JSON next to the Markdown:
curl https://markdowntopdf.dev/pdf -H 'content-type: application/json' -o report.pdf \
-d '{"markdown": "# Hello", "options": {"fonts": {"body": "Lora"}}}'
- Typography. Any of the 1,800+ families on Google Fonts, set separately for body text, each heading level, table headers and code.
- Branding. Your logo as a URL or inline SVG, on the first page or every page. Colors for links, table headers, borders and striped rows.
- Layout. Page size (A4, US Letter, A5, US Legal), margins, a taller first page for a letterhead, header text, and page numbers in the format you choose.
- PDF properties. Title, author and subject, so the file looks right in a document management system.
Layout with comments
Markdown has no way to center a title or right-align the totals on an invoice. HTML comments on their own line fill that gap. They steer the layout and never print:
<!-- center -->
# Service Agreement
Acme Inc. and Northwind Traders
<!-- space: 2 -->
<!-- justify -->
This agreement sets out the terms under which Acme provides services.
<!-- left -->, <!-- right -->, <!-- center --> and <!-- justify --> apply until the next alignment comment. <!-- fullwidth --> stretches the next table across the page, and <!-- space: 3 --> adds three blank lines. An alignment comment between table rows realigns every row after it, which is how you line up a subtotal, tax and total on the right. Any Markdown editor or renderer simply hides these comments, so your source stays readable.
Built for agents
Agents are now the main writers of Markdown, so we made the API easy for them to use. The site serves llms.txt and an OpenAPI spec, and the home page has a "Copy prompt for your agent" button. Paste it into Claude, ChatGPT, Cursor or any agent that can make an HTTP request, and it can hand you a PDF instead of a wall of Markdown.
The instructions also tell the agent to ask you once how you want your documents branded, then save those options so every document it produces looks the same.
Free, with fair use
There's no paid plan behind it. The only limits are there to keep the service healthy for everyone:
- 30 documents per minute per IP address
- 512 KiB of Markdown per document
- 20 remote images per document
We don't store your documents. Your Markdown is rendered in memory and discarded with the response, and images are fetched for that one request. Only fonts and logos are cached, because they repeat from one request to the next.
When you need more than Markdown
Markdown to PDF is the simplest case of something we do every day: turning data into documents. When the document is a contract built from a template, a government form to fill in, or a PDF that needs to be signed, the CloudRaker API does those too. Compose fills templates, fill completes existing PDF forms, and Rakesign collects legally binding signatures. You can also go the other way, with extraction, parsing and classification for the documents coming in.
Try it now at markdowntopdf.dev. Pick a sample, change the font, and download the PDF.