What the Merge PDF does
Merge PDF accepts two or more PDF files and produces one document, merged.pdf, containing every page of every input in sequence. It is built on pdf-lib's copyPages, which copies each page object together with the fonts, images and graphics it depends on. Nothing is rasterised and nothing is recompressed, so a merged page looks and behaves exactly like the page it came from.
The order of the output follows the list that appears under the drop area after you select files, read from top to bottom. That order comes from your operating system's file dialog, not from anything you drag on the page. You can take a file out of the list with its remove button, but you cannot move it; choosing files again adds them to the end of the list.
Typical uses are joining a cover letter to a CV, stapling several scanned receipts into one expense claim, or combining chapters exported separately from a word processor. Mixed page sizes and orientations are fine; a landscape A3 drawing can sit between portrait letter pages and each keeps its own dimensions.
How to use it
Select two or more PDFs
Click the drop area, or drop files onto it, and pick everything you want to combine. The Merge button stays disabled until at least two files are listed.
Check the order
Read the list from top to bottom; that is the page order you will get. Remove any file you do not want, or press Clear and select the set again if the order is wrong.
Merge and download
Press Merge. The page confirms how many files and pages were combined and shows merged.pdf in a result card with its size; press Download on the card to save it.
Controlling the order of the merged document
The tool has no drag-and-drop reordering, so the practical lever is file naming. In practice a file dialog hands files over in the order they appear in it, and most people sort by name, so prefixing names with 01, 02, 03 before you select them gives a predictable result. The numbered list on the page is your check: if 3 appears where you wanted 1, reselect the files.
If you need the same file twice, for example a blank separator page between sections, merge in two passes: merge the first group, then merge that result with the remaining files. Because pages are copied without loss, a second pass costs nothing in quality.
What is kept and what is not
Page-level content survives intact: text with its fonts, vector drawings, embedded images at their original resolution, page size, and each page's rotation setting. The output is saved with object streams enabled, which keeps the merged file compact.
Document-level features do not travel with pages. Bookmarks and the outline panel, document metadata such as title and author, and the definitions behind interactive form fields belong to the source document rather than to its pages, so merged.pdf will not have them. Form fields may still be drawn on the page but may no longer accept input. If any input is encrypted, the tool stops with a message saying one of the PDFs is encrypted or unsupported, and nothing is downloaded.
Limits to know before you rely on it
- No reordering on the page: the sequence is fixed by the order your file dialog returns, and only Remove is available.
- Bookmarks, outlines, metadata and form field definitions from the source files are not carried into merged.pdf.
- An encrypted or password-protected input stops the whole merge; nothing is produced until it is decrypted.
- All inputs are held in memory at once, so very large sets can exceed what your browser allows.
- The output name is always merged.pdf; rename it after downloading if you need something else.
Questions people ask about the Merge PDF
Does merging reduce the quality of the pages?
No. pdf-lib copies page objects and their resources rather than redrawing them. Text stays selectable, images keep their pixels and vector graphics stay sharp at any zoom level.
Can I change the order after selecting the files?
Only by removing files. There is no drag handle. If the order is wrong, select the files again in the right sequence, or rename them with number prefixes so the file dialog lists them the way you want.
Why did the merge fail with an encrypted or unsupported message?
At least one file is password-protected or uses features pdf-lib cannot parse. Open that file in its original application, save a copy without protection, and try again. Check each input separately if you are not sure which one it is.
Will my bookmarks appear in the merged file?
No. Bookmarks are stored at document level and copyPages works at page level, so they are left behind. You would need to add them again in a desktop PDF editor if you rely on them.
Is there a limit on how many PDFs I can combine?
The code sets none. The limit is memory: every input and the growing output live in your browser at once. Dozens of small files are fine; a handful of very large scans may fail, in which case merge them in smaller groups.
Are my PDFs uploaded to a server?
No. pdf-lib runs inside the page and the merged file is offered through a temporary browser URL that is revoked shortly after the download starts. Nothing is sent anywhere and nothing is kept once you close the tab.
Sources and further reading
- pdf-lib API reference for PDFDocument: copyPages, getPageIndices and addPage, the calls that build the merged file
- MDN Web Docs: input type=file, the multiple attribute and the FileList the browser returns
- MDN Web Docs: URL.createObjectURL, the temporary browser URL used for the download
- Library of Congress format description of the PDF (Portable Document Format) family