PDF Merge
Merge multiple PDF documents into a single file
/pdf/merge
curl -X POST "https://pdf.toolkitapi.io/pdf/merge" \
-H "Content-Type: application/json" \
-d '{
"pdf_urls": [
"https://toolkitapi.io/report-q1.pdf",
"https://toolkitapi.io/report-q2.pdf"
]
}'
import httpx
resp = httpx.post(
"https://pdf.toolkitapi.io/pdf/merge",
json={
"pdf_urls": [
"https://toolkitapi.io/report-q1.pdf",
"https://toolkitapi.io/report-q2.pdf"
]
},
)
print(resp.json())
const resp = await fetch("https://pdf.toolkitapi.io/pdf/merge", {
method: "POST",
headers: {
"Content-Type": "application/json",
},
body: JSON.stringify({
"pdf_urls": [
"https://toolkitapi.io/report-q1.pdf",
"https://toolkitapi.io/report-q2.pdf"
]
}),
});
const data = await resp.json();
console.log(data);
# See curl example
{
"pdf": "JVBERi0xLjcKMSAwIG9iago8PC...",
"page_count": 14,
"file_size": 245832,
"input_count": 2
}
Description
How to Use
1. Provide a list of PDFs to merge — either as `pdfs` (base64-encoded strings) or `pdf_urls` (public URLs). You must use one or the other, not both.
2. Order the list in the sequence you want pages to appear in the final document. The first PDF's pages come first, then the second's, and so on.
3. Send a POST request and check the `page_count` field in the response to confirm all pages were included.
4. Decode the base64 `pdf` field to save the merged document.
About This Tool
PDF Merge combines two or more PDF documents into a single file in the order you provide them. Use this tool when you need to consolidate separate reports, invoices, or chapters into one cohesive document.
You can supply PDFs as base64-encoded strings or as publicly accessible URLs. The endpoint accepts between 2 and 20 documents per request, preserving the original page content, bookmarks, and formatting.
Why Use This Tool
- Quarterly report assembly — Combine monthly reports into a single quarterly document
- Invoice bundling — Merge multiple invoices into one PDF for batch processing
- Document compilation — Join cover page, table of contents, and content chapters
- Portfolio creation — Combine individual project PDFs into a presentation portfolio
- Legal document assembly — Merge contract sections, exhibits, and addenda
Frequently Asked Questions
How many PDFs can I merge at once?
Are bookmarks and links preserved?
Can I mix base64 and URL sources?
Start using PDF Merge now
Get your free API key and make your first request in under a minute.