Merge PDF Files: How to Combine PDFs in the Order You Need

Merging is the simplest operation in the whole PDF toolbox and also the one people get wrong most often. You have several documents, you need one file, and you need the pages in a specific sequence. That is all a merge does. The interesting part is what happens to page order, page sizes, links, and file size along the way, and that is what this guide covers.

The merge tool on this site is one tab of a nine-operation PDF workbench that runs entirely in your browser. Files are read on your own device with pdf-lib and pdf.js, and no upload is involved, so you can merge a contract, a medical scan, or an ID copy without sending it anywhere.

What actually happens when you merge PDFs

A PDF is a container. Inside it there is a page tree that lists pages in order, and each page points at content streams, fonts, and images that are stored once and referenced. Merging reads that structure from every source file and writes a new container whose page tree is the concatenation of the originals.

Nothing is re-encoded. Text stays text, images keep their original resolution, and embedded fonts are copied as they are. A merge is therefore lossless by construction: the pages of the output are the same objects as the pages of the input, just collected under one new document. That is why a merged file weighs roughly as much as the sum of its sources rather than more, and why the operation is fast even on large documents.

This matters for one practical reason. Any step that rewrites page content can damage a document, but a merge does not touch content at all. The only things it changes are page numbering, the document outline, and the metadata that a document keeps at its top level. Everything below that level travels intact.

Why the order of your files becomes the page order

Most tools merge in the order you add the files, and some of them then sort by filename. Those two rules disagree the moment your files are named chapter-10.pdf and chapter-2.pdf. Check what your tool does before you blame the output.

The workbench here is explicit: the list is the order. Each file has move-up and move-down controls, a single file can be removed from the list, and any file in the list can be opened in a preview before you commit. Nothing is sorted behind you, so what you see in the list is exactly the page sequence in the result.

For repetitive work there is a habit worth adopting. Name the sources with two-digit numeric prefixes, so 01-cover.pdf, 02-terms.pdf, 03-signature.pdf. Two digits rather than one, because otherwise 10- sorts before 2- in every alphabetical file dialog you will ever use. Then add the files in one multiple selection and the order is already correct.

One thing a merge cannot fix for you: page numbers printed on the original pages. If the first document ends at page 5 and the second starts at page 1, the merged file shows 1, 2, 3, 4, 5, 1, 2, 3. Those digits are part of the page content drawn by the source document, so they stay where they were. If you need continuous numbering, remove the old numbers from the sources first or stamp new ones onto the merged result.

How do you merge only some pages?

This comes up constantly with long documents, and the clean way to do it is a two-step extraction followed by a merge. Pull the pages you actually want out of each source, then join those extracts.

The Split / Extract tab takes one loaded PDF at a time and works in two modes. Extract page range accepts a list like 1-3,5,7-9 and produces one output file per range: a single range downloads directly as <name>_extract.pdf, and several ranges arrive as a zip with <name>_part_1.pdf, <name>_part_2.pdf and so on. Split into single pages writes <name>_page_N.pdf for every page, packaged as a zip whenever the document has more than one page.

Both modes validate against the real page count. Ask for page 99 of a twelve-page file and you get an error message instead of a truncated download, which is the behaviour you want when the request is automated or part of a longer checklist.

The reversed workflow is just as common. Instead of extracting the pages you want, split the source into individual pages, then merge only the ones you keep. That is the reliable route when the picks are scattered, say pages 1, 4, and 9 of a report, because a pick list is not a range and no range syntax will express it.

What survives a merge and what does not

Page-level operations are faithful. Document-level features are where documents quietly lose something, and it is worth knowing which column you are in before you send the file to someone.

Element After merging Notes
Text, images, layout Preserved Page content is copied, not re-rendered
Embedded fonts Preserved Fonts travel with the pages that use them
Text layer and search Preserved A searchable PDF stays searchable
Page size and orientation Preserved per page A merged file may mix A4 and Letter
Annotations and comments Usually preserved Depends on the source reader
Form fields Often preserved Interactive fields may stay fillable
Hyperlinks Partly preserved Internal jumps can point at old page numbers
Bookmarks and outline Commonly lost Outlines are document level, not page level
Printed page numbers Not updated They are drawn content from the source
Digital signatures Invalidated Any rewrite breaks the signature bytes

The signature row deserves emphasis. A digital signature is calculated over the exact bytes of the original file, so merging, splitting, compressing, or re-saving a signed PDF produces a document whose signature no longer verifies. If a contract or an invoice is signed and that signature matters, keep the untouched original and treat anything derived from it as an unofficial copy.

Mixed page sizes in one document

Merging an A4 document with a US Letter document produces a PDF with both page sizes inside it. This is valid PDF and every mainstream reader handles it, but it can confuse printing, because a print job set to A4 will scale or crop the Letter pages depending on the driver.

The two standards are close and that is exactly why the mismatch stays invisible until print time. A4 is 210 × 297 mm, which is 595.28 × 841.89 points. US Letter is 8.5 × 11 in, or 612 × 792 points. A4 is narrower and taller; Letter is wider and shorter. Neither fits the other without a small scale factor.

If the output has to be uniform, normalise the odd pages out. The Images to PDF tab shows the arithmetic you would otherwise do by hand: pick a page size (A4, Letter, or Fit to image), an orientation, and a margin, and each image is scaled down to fit the printable area using min(available width / image width, available height / image height, 1) so that it is never enlarged, then centred. The same reasoning applies to PDFs you build from image-based sources: choose the paper first, then let the content fit inside it.

Why the merged file is large, and how much compression removes

Almost every oversized PDF is oversized for one reason: the photographs and scans stored inside it. Text, fonts, links, and vector drawings take a few kilobytes per page even in a long document, while a single scanned page can weigh several megabytes. A hundred-page text-only contract may stay under 1 MB. A fifty-page colour scan will not.

That fact decides which fix works. Merging changes size only by addition, so if the result is too big for an email or a portal, the bytes have to come out of the images.

The Compress tab offers three rasterising presets, and they are worth stating precisely because the names hide the numbers. High quality renders each page at 1.5× and encodes JPEG at 0.8. Balanced uses 1.2× and 0.6. Small file uses 1.0× and 0.4. In all three, the output page keeps the original point dimensions, so the geometry of the document does not change even though the rendering resolution does.

Rasterising has a cost that the tool states up front: selectable text and crisp vector lines become an image, so the output is no longer searchable and text copied from it will not be clean. Re-encoding at JPEG quality 0.8 to 0.85 typically cuts an image-heavy PDF by 60 to 80 percent with no visible difference on screen, which is why the high setting is the right first attempt. If the re-encoded file would not be smaller than the input, the original bytes are returned and the tool says so instead of reporting a success that did not happen.

Hard cases exist. A password-protected PDF has to be unlocked before it can be rewritten. A PDF whose images are stored in a format the browser cannot re-encode will barely shrink. And a signed document, as noted above, should not be compressed at all if the signature matters.

Doing the rest of the job in the same pass

Merging is rarely the only change a document needs, and switching between five separate web tools for five small edits is how mistakes get made. The workbench keeps the operations in one place, and each of them has a defined result rather than a preview that may or may not match the download.

Rotate handles the sideways scan. Every page is rendered as a thumbnail, clicking a page turns it 90 degrees clockwise, and the rotate-all buttons turn the whole document in one direction. Rotation in a PDF is normally stored as an instruction attached to the page rather than a redrawn image, which is why a recipient with an old viewer may still see the page as it was stored; exporting the rotated file resolves that.

Reorder rearranges and deletes. Pages are dragged into a new sequence, unwanted ones are dropped with the ✕ button, and applying the order saves the remaining pages in the order shown. Watermark stamps a text watermark on every page with a chosen size between 12 and 144 points, an opacity between 0 and 100 percent, a colour, and one of six placements. Sign draws a signature into a chosen page, either from a signature pad or from an uploaded PNG.

Two of these operations are useful before a merge and two after. Rotating and deleting belong before, because the pages you merge should already be right. Watermarking and signing belong after, so a stamp or a signature is applied once to the finished document rather than to each part.

Frequently Asked Questions

?How many PDF files can I merge at once?

There is no count limit, but every file is read into the browser first, so the ceiling is your device's memory. A dozen ordinary documents is unremarkable. If a session feels slow, merge in two batches.

?Does merging PDFs reduce quality?

No. Merging copies existing pages into a new container without re-encoding images or fonts. Quality only drops if you compress the result afterwards, because compression re-encodes pages as JPEG images.

?Can I merge a PDF and a JPG together?

Not directly. The Merge tab accepts PDFs only. Turn the images into a PDF with the Images to PDF tab first, then merge that file with the others in the order you want. Page size and orientation for those image pages are chosen in that tab.

?Why is my merged PDF in the wrong order?

Usually because the tool sorts by filename while you expected the order you added files in. Name the sources with two-digit prefixes such as 01-, 02-, 03-, so that alphabetical order and intended order agree.

?Can I merge password-protected PDFs?

No. An encrypted file cannot be read without the password, so its pages cannot be copied. Open it with the password, save an unlocked copy, and merge that instead. Keep the protected original as the authoritative version.

?How do I merge only certain pages from several PDFs?

Extract first, then merge. Enter a list like 1-3,5 in the page-range field to get one small PDF per range, then join those extracts. For scattered single pages, split the source into individual pages and merge only the ones you keep.

?Is it safe to merge contracts or ID scans online?

Only if the processing stays local. In this workbench the files never leave your device: they are read by JavaScript in the tab and nothing is uploaded. That is what makes a contract or an ID scan reasonable to handle here.

?Why is the merged file bigger than I expected?

Merging adds file sizes together, so five large scans produce a large document. The saving has to come out of the images: use the Compress tab, then check the result is still readable at 100 percent zoom. Compression rasterises pages, so keep the searchable original.

user8128167
user8128167

Calgary, Canada · SO reputation 7994 · Badges: 6🥇74🥈89🥉 · SO member since 2010