Merge PDFs

Merge PDFs

Merge PDFs is a REST API tool that joins together any number of full PDF files or specified pages from separate documents into a consolidated PDF.

Get the best with pdfRest

Merge without the Bloat
Many tools claim to merge PDF documents together, but most leave the resulting file with unnecessary, redundant content we like to refer to as “bloat.” This can make the file size much bigger than it needs to be and create a much slower user experience for file transfers and viewing.

pdfRest optimizes the content of every merged PDF it creates to ensure the output file contains only what it needs.
Assemble Your Perfect Document

pdfRest’s Merge PDFs allows for much more than full document merging.  Let’s say you only need page 1 from Document A, pages 3-5 from Document B, and pages 15, 18, and 72 from Document C… no problem!  Choose exactly which pages to include from each input file and specify the exact order you need them in the output file.

Level Up with Chainable API Calls
Sometimes you need to merge PDFs together, but other times you may need to merge various file types together into one PDF, such as Word documents with PNG images and HTML files.

pdfRest is purpose-built to support multi-step workflow processes. Simply upload your files of various type to the Convert to PDF tool and pass the resource IDs of each output file from those calls to the Merge PDFs tool. No need to download and upload files between API Calls - simply chain calls together.

Start from Code Examples

  1. First, you'll need an API Key - visit Get Started to:
    • Stay anonymous with a Guest API Key for 50 free API Calls
    • Sign up for an upgraded API Key with unlimited, continuous service
  2. Choose your programming language
  3. Copy and paste the code to your project
  4. Update Api-Key field with your unique API Key
  5. Update file with the local path to your input
  6. Run this code to send an API Call
See more code examples in our
GitHub repository
Try pdfRest with just a few clicks
Download our Postman Postman Collection
curl -X POST "" 
  -H "Accept: application/json" 
  -H "Content-Type: multipart/form-data" 
  -H "Api-Key: xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx" 
  -F "file=@PATH_TO_FILE/example_file1.pdf" 
  -F "pages[]=1-7" -F "type[]=file" 
  -F "file=@PATH_TO_FILE/example_file.pdf2" 
  -F "pages[]=2-last" 
  -F "type[]=file" 
  -F "file=@PATH_TO_FILE/example_file3.pdf" 
  -F "pages[]=2,4,6,8" 
  -F "type[]=file" 
  -F "output=example_out"

Customize Your Solution


The file parameter allows you to select two or more local PDF files to be uploaded to pdfRest’s processing server. (You can include this parameter multiple times.) Files will be merged in the order that they are listed.

The Merge PDFs tool requires the type[] parameter for each instance of file.

Generate a self-service API Key now!

Create your FREE Guest API Key to start processing PDFs in seconds, only possible with pdfRest.