Back to Blog
PDF Tools

How to Merge PDF Files: 5 Methods Compared

PDF-Builder Team·

How to merge PDF files: 5 methods compared

You have five separate PDFs — an invoice, three contract pages, and an appendix — and you need them as one file. You search "merge PDF" and get dozens of results. Adobe wants $20/month. Some site you've never heard of wants you to upload your contract. A Reddit thread says Mac users don't even need a tool.

Which method should you use? It depends on what you're merging and how much you care about where your files end up.

There are five ways to merge PDFs. Each has real tradeoffs in cost, privacy, and convenience. Here's how they compare.


Quick comparison

MethodCostPrivacySetupBest for
Online toolsFree (with limits)Low — files uploaded to serversNoneQuick one-off merges of non-sensitive docs
Desktop softwareFreeHigh — local processingInstall requiredRegular use, sensitive documents
Built-in OS toolsFreeHigh — local processingNoneMac users, simple merges
Browser-based local toolsFreeHigh — files stay on your deviceNonePrivacy + convenience
Command lineFreeHigh — local processingSome setupDevelopers, batch processing

Method 1: Online tools

The fastest option. Go to a website, upload your PDFs, click merge, download the result.

Adobe Acrobat online, iLovePDF, and Smallpdf all offer this. The process is nearly identical across all three: drag files in, arrange the order, click merge.

Using iLovePDF as an example:

  1. Go to ilovepdf.com/merge_pdf
  2. Click "Select PDF files" or drag them onto the page
  3. Reorder files by dragging thumbnails
  4. Click "Merge PDF"
  5. Download the merged file

Takes about 30 seconds for a handful of files.

The limits matter. Smallpdf gives you 2 free tasks per day. iLovePDF allows 1 task per hour. Adobe lets you merge once for free, then pushes a subscription. These caps are frustrating if you merge files regularly.

The privacy tradeoff is real. Your files get uploaded to their servers during processing. Most services say they delete files within 1-2 hours. For a restaurant menu or a public flyer, that's fine. For a signed contract, tax return, or medical record, think twice. See our guide on PDF tool privacy for more on what happens to uploaded files.


Method 2: Desktop software

Desktop applications merge files on your computer. Nothing gets uploaded.

Three good free options:

PDFsam Basic is open-source and runs on Windows, Mac, and Linux. It does one thing well: merge, split, and rearrange PDFs.

  1. Download PDFsam Basic from pdfsam.org
  2. Open the app and select "Merge"
  3. Add your PDF files
  4. Drag to reorder
  5. Choose an output location and click "Run"

PDF24 Creator (Windows) has merge built into a larger toolkit with 50+ PDF tools. All free, all local.

PDFgear (Windows, Mac, iOS) has a cleaner interface and handles merge alongside editing and annotation.

All three process files locally. Your documents never leave your machine. For anyone handling sensitive files regularly, this is the right category. For a broader comparison of these and other tools, see our best free PDF tools guide.


Method 3: Built-in OS tools

Mac users can merge PDFs without installing anything. This is the most underrated method — many people don't know Preview can do this.

Merging PDFs with macOS Preview:

  1. Open the first PDF in Preview
  2. Go to View > Thumbnails (this shows the page sidebar)
  3. In Finder, select the second PDF
  4. Drag it into the thumbnail sidebar at the position where you want it inserted
  5. Rearrange pages by dragging thumbnails
  6. Save with File > Export as PDF

That's it. No app to install, no account to create, no file uploaded anywhere. Preview has been on every Mac since OS X.

You can also select specific pages from a second PDF. Open both files in Preview, show thumbnails in both, and drag individual pages from one window to the other.

On Windows, there's no true built-in merge tool. The "Print to PDF" feature can combine files through a print dialog, but it re-renders the content and can lose formatting, links, and form fields. It's a workaround, not a real merge. Windows users are better off with one of the desktop tools above.


Method 4: Browser-based local tools

This category is newer and worth understanding. These tools look like online tools — you open a website, drag in files, click merge. But the processing happens in your browser using WebAssembly and JavaScript. Your files never leave your device.

PDF-Builder works this way. You can merge PDFs directly in your browser with no upload, no account, and no file size limits. The merge happens on your machine using your browser's processing power.

This is the middle ground between online tools (convenient but upload your files) and desktop software (private but requires installation). You get both convenience and privacy.

If you're merging sensitive documents but don't want to install software, this is the method to use.


Method 5: Command line

For developers and anyone who needs to automate merges, the command line is the most flexible option.

Ghostscript is a free tool that's already installed on many Linux and Mac systems:

gs -dBATCH -dNOPAUSE -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf file3.pdf

This merges three files into one. Add as many input files as you need at the end.

Python with pypdf gives you programmatic control:

from pypdf import PdfMerger

merger = PdfMerger()
merger.append("file1.pdf")
merger.append("file2.pdf")
merger.append("file3.pdf")
merger.write("merged.pdf")
merger.close()

With a few more lines, you can loop through a directory and merge hundreds of files:

from pathlib import Path
from pypdf import PdfMerger

merger = PdfMerger()
for pdf in sorted(Path("invoices/").glob("*.pdf")):
    merger.append(str(pdf))
merger.write("all-invoices-2026.pdf")
merger.close()

This is how you merge 100 invoices in under a second. For anyone running monthly reports or batch-processing documents, command-line tools save hours compared to dragging files into a GUI one at a time.

If the merged file ends up large, you can compress it afterward without losing readability.


Which method should you use

Merging a few non-sensitive pages quickly — use an online tool or a browser-based local tool. Fastest path from "I have separate files" to "I have one file."

Merging contracts, tax documents, or medical records — use desktop software or a browser-based local tool. Your files stay on your device.

Mac user merging occasionally — use Preview. It's already on your computer and handles simple merges without any setup.

Developer automating monthly reports — use the command line. Ghostscript or pypdf can process hundreds of files in a script.

Regular PDF work across many tasks — install desktop software like PDFsam or PDF24. Merge is one of many tools you'll use alongside split, compress, and convert.

The PDF editor market is valued at $5.54 billion in 2026 and growing fast, driven largely by remote work pushing teams toward digital document workflows. 76% of home computer users regularly use PDFs for personal record-keeping. Despite all that usage, most people still don't know they have more than one option for merging.


Tips for better merges

Check page orientation before merging. A landscape page dropped into a portrait document looks wrong and is easy to miss until someone opens the final file.

Verify page order before saving. Most tools show a thumbnail preview. Take five seconds to scroll through it. Reordering after the merge is more work than getting it right the first time.

Compress large merged files. Combining several PDFs can produce a file too large to email. Run it through a compression tool afterward — you can often cut file size by 50% or more without visible quality loss.

Bookmark important sections. If you're merging a long document from many sources, add bookmarks to help readers navigate. Most desktop PDF editors support this.

Unlock password-protected PDFs first. Most merge tools can't process encrypted files. You'll need to remove the password before merging, then re-apply protection to the merged file if needed.


Summary

Each method has a place. Online tools are fast for one-off, non-sensitive merges. Desktop software handles sensitive documents and regular use. Preview is the zero-install option Mac users overlook. Browser-based local tools give you convenience without uploading your files. Command-line tools let developers automate.

Pick the method that matches your situation — what you're merging, how often, and whether privacy matters for that document. For most people, that answer changes depending on the file.