PDF Merger: Combine Files in Your Browser
Scanned documents often arrive in pieces, and the pieces need to become one file before anyone else sees them. This page loads each PDF you pick, copies its pages into a new document in the order you set, and hands back a single download. Files are read in the tab, so nothing you combine is sent to a server, and any file that cannot be parsed is skipped and named in the issues list.
Merge PDFs in Any Order
Choose PDF files
Select two or more PDF files. Supported files: encrypted or damaged PDFs are skipped and reported in the issues list.
Merge
The merge runs in the order shown in the list above. Reorder rows before pressing the button.
Result
How It Works
Each file you pick is read into memory with the browser File API. The merger loads every file with pdf-lib, copies its pages into a new document in the order of the list, and writes the result back to bytes. The total page count and the per-file ranges come from that same pass, so the summary always matches the file you download.
The list order is the only thing that decides page order. Moving a file up shifts all of its pages earlier in the merged document, and removing a file leaves it out entirely. The order summary prints the exact page range each source file occupies after the merge, which makes boundary checks quick.
A file that pdf-lib cannot parse is skipped and named in the issues list. That covers empty files, damaged structures, and PDFs still carrying encryption. The remaining files still merge, so one bad file does not hold up the rest of the batch.
| Stage | What runs | Where the bytes stay |
|---|---|---|
| Selection | File API reads each file into a byte array | Tab memory |
| Merge | pdf-lib copies pages in list order | Tab memory |
| Download | Bytes become a blob and an object URL | Local disk after you save |
Before and After
1. scan-part-b.pdf 2.1 MB
2. scan-part-a.pdf 3.4 MB 2 files, 9 pages total
scan-part-b.pdf: pages 1-4 (4 pages)
scan-part-a.pdf: pages 5-9 (5 pages) report-locked.pdf could not be parsed
(it may be encrypted or damaged)
and was skipped All files merged. Nothing was skipped.
[ Download merged PDF ] 548 KB Use Cases
| Scenario | What to arrange | Result |
|---|---|---|
| Scanned contract packets | Pages in signature order | One file the other side can review |
| Monthly reports | Jan to Dec file order | A single yearly archive |
| Book chapters | Chapter files in reading order | A full draft for an editor |
| Court or grant exhibits | Exhibit labels against list order | Numbered pages in one attachment |
| Scanner multi-part exports | Tray output in reverse order | One continuous document |
Common Mistakes
- Adding a password-protected PDF and expecting it to merge. It is skipped with a parse error until the password is removed.
- Removing a file from the middle of the list and expecting its pages to reappear later. Removal takes those pages out of the output.
- Merging very large scans in one pass. A combined file past a hundred megabytes can stall or empty the browser tab.
- Expecting form fields to keep working. Two source files often define the same field names, and the copies collide in the merged document.
Best Practices
- Set the order first, then read the order summary after the merge to confirm each file got the page range you expected.
- Remove passwords and repair damaged files before adding them, so the issues list stays short and readable.
- Merge in batches when the combined size passes a few tens of megabytes, then merge the batch files together at the end.
- Open the downloaded file once and jump between the printed page ranges to check the seams before you send it on.
Frequently Asked Questions
Does this merger upload my PDF files?
No. The page reads each file with the browser File API and builds the combined document with pdf-lib in memory. No request carries your bytes anywhere, so contracts and reports stay on the machine. Closing the tab discards all of it.
How do I change the order of the merged pages?
Select your files, then use the up and down buttons on each row. The merge runs in the order shown in the list, and the order summary prints the resulting page ranges for each file after the merge.
What happens to encrypted or damaged PDFs?
A file that cannot be parsed is skipped rather than silently dropped. The issues list names each skipped file and the reason, which is usually an encryption flag or structural damage. Remove it or replace it with a clean copy, then merge again.
Will forms, links, and fonts survive the merge?
Copied pages keep their content streams, so text, images, and vector drawings carry over. Form fields and interactive annotations can break because field identifiers may collide across files. Check forms after merging and flatten them in the source files if needed.
How large can the merged PDF get?
The limit is the memory available to the browser tab. Files of a few tens of megabytes usually work; very large scans may stall the tab or empty it. Merge in smaller batches when the combined size passes roughly one hundred megabytes.
Can I merge password-protected PDFs?
Only if the file opens without a password prompt. pdf-lib rejects encrypted documents, so a locked PDF appears in the skipped list with a parse error. Remove the password with a desktop tool first, then add the file again once the password is gone.
Why does the download say merged.pdf for every run?
The output keeps a fixed name so saved files line up in your downloads folder. Rename after saving if you keep several merged documents, or clear the list and merge a different batch to produce a new file.