How do you merge PDF files without uploading them?
You merge PDFs in the browser by reading each file locally and copying its pages into a new document. This tool does exactly that: pick two or more PDFs, click Convert, and it builds one combined file with pdf-lib, a JavaScript PDF library, without sending a byte of your documents to a server.
Most "free PDF merger" sites work the other way round: they upload your files, combine them on their machines and send back a download link. That's fine for a recipe, less fine for a tenancy agreement or a bank statement. Here the files are opened with the browser's FileReader API, merged in memory, and offered back to you as a download named merged.pdf.
Steps
- Click Choose PDF files and select every file you want combined. Hold Ctrl (Windows, Linux) or Cmd (macOS) to pick several at once, or Shift to pick a run of files.
- Click Convert.
- Click Download to save
merged.pdf. - Open the result and check the page order before you send it anywhere.
If you select only one file you'll see "Choose at least two PDF files to merge." The output box shows the new file encoded as a long data: URL; you can ignore it and use the Download link.
What the merged file contains
Under the hood the tool creates an empty PDF, then for each source file calls pdf-lib's copyPages for every page index and appends the copies. A page in a PDF is a self-contained object that points at its own fonts, images and drawing instructions, so copying a page brings all of that along. Anything that lives at the document level, outside the pages, is left behind.
| Part of the source PDF | Kept in the merged file? |
|---|---|
| Page content: text, vector graphics, images, embedded fonts | Yes, unchanged |
| Page size and existing page rotation | Yes |
| Annotations attached to pages (comments, link boxes) | Copied with the page |
| Bookmarks / outline panel | No |
| Document title, author and other metadata | No; the new file gets pdf-lib's producer stamp and today's date |
| Fillable form fields | May no longer work as fields |
| Password or permission protection | Not applicable: protected files are rejected |
Text stays selectable and searchable, because nothing is rasterised. The pages are copied as PDF objects, not re-drawn as pictures.
File order
The merge follows the order of the file list the browser gives the page, and there's no drag-to-reorder. That order comes from your operating system's file dialog, and it may not match the order you clicked in. If sequence matters (an invoice followed by its receipts, say), check the output. With many files, merging in smaller batches and checking each result makes a misplaced document easier to spot than scrolling through one 80-page file.
When merging fails
Errors from the PDF library are shown after the text "Could not merge those PDFs:", so you'll see the underlying reason.
| Message ends with | Cause | What to do |
|---|---|---|
| "is encrypted. You can use ... ignoreEncryption" | One file has password or permission protection | Remove the protection in the original app, then retry |
| "No PDF header found" | A file isn't really a PDF (renamed, truncated, or an HTML error page saved as .pdf) | Re-download or re-export the file |
| Other parse errors | The file is damaged or uses structure pdf-lib can't read | Open it in a PDF viewer and "Save as" or "Print to PDF" a fresh copy |
The encryption rule catches people out. The PDF format allows a file to open freely yet carry an owner password that restricts printing or copying (ISO 32000-1, section 7.6). pdf-lib treats any file with an encryption dictionary as off-limits by default, so even those "open but restricted" PDFs are refused.
Size of the merged file
The result is roughly the sum of the inputs, sometimes a little smaller. pdf-lib writes the new file with compressed object streams, which packs the small structural objects tightly, but it doesn't re-encode images, so ten scanned pages stay ten scanned pages' worth of data. If the combined file is too big to email, compress any photos before they go into a PDF using the image compressor, or run the merged file through the PDF compressor, which re-encodes embedded JPEG photos at a lower quality.
Related PDF tools
- Split a PDF to pull a page range back out, for example to drop a cover page before merging.
- Add page numbers to a PDF after merging, so the combined document is numbered continuously.
- Convert JPG to PDF first if some of what you're combining is photos or scans saved as images.
Last updated