# Merge PDF

> Join two or more PDF files into one document, page by page, in the order you pick or by file name. The files are read in your browser and never sent anywhere.

Use it online (free, runs in your browser): https://directory.milunir.com/pdf-tools/organize-pdf/merge-pdf/

To merge PDFs, choose two or more PDF files; their pages are copied one after another into a single new PDF that you download. A 1-page letter plus a 3-page appendix gives a 4-page file, and every page keeps its own size, text and images.

Sending one attachment instead of five, handing in a form with its supporting scans, or putting a cover letter in front of a report all come down to joining PDFs. This page copies every page of each file, in order, into one new document built by pdf-lib in your browser. The pages are not re-printed or re-compressed, so text stays selectable and images keep their quality. It shows the total page count and the new file size, lists how many pages came from each file, and warns when the files use different page sizes such as Letter and A4. One limit: fill-in form fields, bookmarks and links that jump between files are not carried over, and password-protected PDFs must be unlocked first.

## How to use

1. **Choose the PDF files**: Press Choose PDF files and select two or more, or drop them on the box. Each file can be up to 50 MB.
2. **Check the order**: Pages follow the order the files were picked. Under More options, By file name sorts them A to Z instead, with numbers in natural order (2 before 10).
3. **Download the merged PDF**: The page count and file size appear as soon as the files are read. Press the download button to save the new PDF.

## Examples

### A letter and a three-page appendix

- Page order: As picked
- PDF files: fixture:text-1page-letter.pdf; fixture:three-pages-mixed.pdf

Result: Merged PDF: 4 pages, 1.2 KB Pages: 4 File size: 1.2 KB

A one-page US Letter document is followed by a three-page file that mixes Letter, A4 and A4 landscape pages. The merged PDF has 1 + 3 = 4 pages, and each page keeps its own size, which the page points out.

### Two copies of a one-page form

- Page order: As picked
- PDF files: fixture:text-1page-letter.pdf; fixture:text-1page-letter.pdf

Result: Merged PDF: 2 pages, 897 B Pages: 2 File size: 897 B

Picking the same one-page Letter form twice gives a two-page PDF, handy for printing a form front and back. All pages share one size, so there is no size note.

### Picked out of order, sorted by name

- Page order: By file name
- PDF files: fixture:three-pages-mixed.pdf; fixture:text-1page-letter.pdf

Result: Merged PDF: 4 pages, 1.2 KB Pages: 4 File size: 1.2 KB

The three-page file was picked first, but By file name puts text-1page-letter.pdf ahead of three-pages-mixed.pdf, so the one-page letter opens the merged file.

## How it works

`pages in the merged file = pages of file 1 + pages of file 2 + … + pages of file n`

- `n`: the number of PDF files picked, from 2 to 50

Each file is opened with pdf-lib. Every page object, with the fonts, images and drawings it uses, is copied into a new document in order, as ISO 32000 describes a page tree. Nothing is redrawn, so a page's size, rotation and text stay as they were. The new file is saved with compressed object streams, then read back once to count its pages and list each page size in points (72 points to the inch).

Sources:

- [ISO 32000-2:2020 Document management — Portable document format — Part 2: PDF 2.0](https://www.iso.org/standard/75839.html), ISO

## When not to use it

- To keep fillable form fields working, since the merged copy drops them.
- To combine password-protected PDFs before removing their passwords.
- To pick single pages out of a file; that needs a page selection tool.

## Common mistakes

- Picking files in a random order from a folder and not checking the page order before sending.
- Expecting a smaller file: the merged size is about the sum of the inputs.
- Mixing Letter and A4 pages and then printing without checking how the printer scales them.

## Questions

### Why are my form fields and bookmarks missing after merging PDFs?

Pages are copied with their visible content, but interactive parts that belong to the whole document, such as fillable fields, the bookmark outline and links that jump to another file, are not carried into the new PDF. Fill and flatten a form before merging if the answers must stay, or merge in a desktop PDF editor that rebuilds the outline.

### Can I merge password-protected PDF files?

Not directly. A PDF with an open password is encrypted, so its pages cannot be read until it is unlocked. Open it in a PDF reader with the password, save or print an unlocked copy, and merge that copy. The page names the file that needs unlocking.

### Does merging PDFs reduce quality or file size?

Quality stays the same because pages are copied, not re-rendered: text stays sharp and images are not compressed again. For the same reason the merged file is close to the sum of the original sizes, sometimes slightly smaller when shared fonts and compressed object streams save space.
