PDF tools API
Split, convert, watermark, and encrypt PDFs with one API request each. Send a file, and get back links to the files it makes.
- No credit card needed
- 14 tools
- 0.5¢ per job on Starter
Trusted by teams in lending, insurance, property, and healthcare
The tools
Each tool is one endpoint. A job on a file of up to 10 pages costs 0.5¢ on Starter.
Split PDF
Split a PDF into a file per page, every few pages, or by page ranges.
Extract pages
Make a PDF of some pages, in any order. Use it to remove or reorder pages too.
Rotate pages
Turn some or all pages by 90, 180 or 270 degrees.
Encrypt PDF
Add a password to open the PDF, and limit printing, copying and changes (AES-256).
Decrypt PDF
Remove the password and permissions from a PDF you have the password for.
Watermark PDF
Put text such as CONFIDENTIAL across the pages, over or under their content.
Add page numbers
Number the pages, with your own label such as "Page 2 of 9".
Compress PDF
Make a PDF smaller without losing quality.
Flatten PDF
Draw form fields and annotations into the pages, so they can't be changed.
PDF to images
Render pages as PNG or JPEG images, at the resolution you choose.
Images to PDF
Make a PDF with one PNG or JPEG image on each page.
PDF to text
Extract a PDF's text into a .txt file, in reading order.
HTML to PDF
Convert a page of HTML and CSS to PDF, with headers, footers and page numbers.
Markdown to PDF
Convert Markdown to a PDF with a clean stylesheet, or your own CSS.
One request for each job
Post the file and the tool's options. The response has the job and a link to each file it made.
- Wait for the files, or let the job run in the background
- Webhooks when a job finishes or fails
- SDKs in ten languages, or any HTTP client
curl --fail-with-body \
"https://sync.api.docspring.com/api/v2/jobs/split_pdf" \
--user "${DOCSPRING_TOKEN_ID}:${DOCSPRING_TOKEN_SECRET}" \
--header 'Content-Type: application/json' \
--data '{
"input": {
"type": "url",
"url": "https://example.com/lease.pdf"
},
"ranges": ["1-2", "3-8", "9-z"]
}'
curl --fail-with-body \
"https://sync.api.docspring.com/api/v2/jobs/markdown_to_pdf" \
--user "${DOCSPRING_TOKEN_ID}:${DOCSPRING_TOKEN_SECRET}" \
--header 'Content-Type: application/json' \
--data '{
"markdown": "# Notes\n\n- [x] Budget approved\n",
"css": "h1 { font-family: Georgia, serif; }",
"page_size": "A4"
}'
HTML and Markdown to PDF, without a template
Send a page of HTML and CSS, or some Markdown, and get back a PDF. Use it for documents you make once.
- DocSpring's own engine, or Chromium for pages that run JavaScript
- Headers, footers, page numbers, and any page size
- A print style for Markdown, or your own CSS
Features
Send a file your way
Give a URL, upload the file, or put it in the request in base64.
Files already in DocSpring
Run a tool on a submission, a combined PDF, or a custom file by its ID.
One tool after another
A job's files can be the next job's input: split a PDF, then watermark one part.
Webhooks
DocSpring sends job.processed when the files are ready, and job.failed with the reason when a job fails.
Files kept as long as you choose
Your account sets how long job files are kept, and a request can set its own time, up to ten years.
A page for your jobs
See each job, its files, and what it cost in your dashboard, and run a tool from there.
AI assistants
Each tool is in DocSpring's MCP server, so Claude, ChatGPT, or Cursor can run it for you.
US or EU hosting
Your files are processed and stored in the region your account is in.
Questions about the PDF tools
Read the PDF tools guideWhat is the PDF tools API?
API endpoints that each do one job on a file: split a PDF, render its pages as images, add a watermark or page numbers, encrypt it, extract its text, or convert HTML or Markdown to a PDF. You send the file and get back links to the files it makes.
Do I need a template?
No. The tools work on the file you send. To convert HTML or Markdown, send it in the request. When you want to fill the same document with different data each time, make it a template and create submissions.
How do I send a file?
Send a URL to download it from, upload it to a link the API gives you, put it in the request in base64, or use a file already in DocSpring: a custom file, a submission, a combined PDF, or a file from an earlier job. That last one lets you run tools one after another, such as adding a watermark and then a password.
Do I have to wait for the result?
Send the request to sync.api.docspring.com and it answers when the files are ready, within a few seconds for most PDFs. It waits up to about 95 seconds. Add ?wait=false to get the job straight away, and a webhook tells you when it has finished: job.processed, or job.failed with the reason.
How long do you keep my files?
As long as your account's expiry setting for the PDF tools says: a day after the job finishes for a new account. A request can set its own time with expires_in, up to ten years, and you can delete a job's files sooner with one request.
Can I try the tools with a test API token?
Yes, but jobs have no test mode. A job made with a test API token runs the same way and costs the same as one made with a live token, and its files have no watermark.
Can my AI assistant use these tools?
Yes. Each tool is also in DocSpring's MCP server, so Claude, ChatGPT, Cursor, or another assistant connected to your account can split, stamp, or convert a file for you. Coding agents can add the DocSpring PDF tools skill, which shows them how to call the API.
Does compressing a PDF lower its quality?
No. Compression is lossless: it repacks the PDF and recompresses its streams, and images keep their quality. It doesn't shrink the images themselves, so a PDF that's mostly photos gets only a little smaller.
How much does a PDF tool cost?
A job on a file of up to 10 pages costs 0.5¢ on the Starter plan, and less on bigger plans. Longer PDFs, very large files, and long processing cost more. Converting HTML or Markdown costs the same.
Run your first PDF tool today
The free plan runs 200 jobs a month. No credit card needed.

