Skip to content

Turn Markdown into a PDF

To turn Markdown into a PDF, send the text to CurlShot in the markdown field of a POST request with format=pdf. It is rendered as a clean, styled page, with headings, lists, tables, links and code blocks laid out for reading, and comes back as a PDF. Leave format out to get an image of the same page instead.

Request
curl -X POST "https://curlshot.com/api/v1/screenshot" \
  -H "X-Access-Key: YOUR_ACCESS_KEY" \
  -H "Content-Type: application/json" \
  -d '{"markdown":"# Weekly report\n\n- Visits: 1,204\n- Signups: 38","format":"pdf"}' \
  --output report.pdf

How to do it, in three steps

  1. 1

    Write the document in Markdown, or take the text your app already has.

  2. 2

    Send it in a POST request in the markdown field, with format set to pdf.

  3. 3

    Save the PDF that comes back.

What people use it for

  • Notes, READMEs and changelogs as a PDF to send
  • Reports written by a script or an AI assistant, as a document
  • Release notes as an image for a post
  • Meeting notes and summaries people can print

For developers: one request

The same thing from your own code. It is a plain HTTP request, so it works from any language. Create a free account to get an access key.

Questions people ask

How do I convert Markdown to PDF?

Send the Markdown to CurlShot in the markdown field of a POST request and add format=pdf. The answer is the PDF file.

Can I change how it looks?

Yes. The styles option adds your own CSS to the page, so fonts, colors and spacing can match your brand.

Can I get an image instead of a PDF?

Yes. Leave format out for a PNG, or ask for jpeg or webp. Set viewport_width to choose how wide the page is.

Are tables and code blocks supported?

Yes. Tables, fenced code blocks, lists, links, quotes and images are all rendered.

Take as many screenshots as you need

A free account gives you 100 screenshots every month and keeps them in one place. No card needed.