Merge PDF Files on Linux or Ubuntu — Browser Tool vs Command Line
- Browser tool: works in Chrome or Firefox on any Linux distro
- pdftk: fastest command-line option — one line, any file size
- ghostscript (gs): pre-installed on many distros, powerful but verbose
- poppler-utils (pdfunite): another pre-installed alternative
Table of Contents
Linux users have more options for merging PDFs than most people realize. The browser PDF merger works in Chrome and Firefox on any distro without installing anything beyond the browser you already have. Or, if you prefer the terminal, a single command handles the job. Here's both paths.
Browser Method — Works on Any Linux Distro, Zero Install
Open Chrome, Chromium, or Firefox and navigate to wildandfreetools.com/pdf-tools/merge-pdf/. The tool runs exactly the same as on Windows or Mac:
- Drag PDF files from your file manager into the upload zone, or click to select
- Arrange the file order if needed
- Click Merge & Download
- File downloads to your ~/Downloads directory
The browser merger processes files in-browser with no upload. It doesn't require root, doesn't need additional packages, and works on Ubuntu, Fedora, Debian, Arch, and any other distro with a modern browser.
For Linux users who prefer not to install GUI applications but occasionally need to merge a handful of PDFs without a terminal command, this is the path of least resistance.
pdftk — The Command-Line Standard for PDF Merging on Linux
pdftk is the most straightforward command-line PDF tool. Install and use:
sudo apt install pdftk-java # Ubuntu/Debian sudo dnf install pdftk # Fedora brew install pdftk-java # if using Homebrew on Linux
Then merge:
pdftk file1.pdf file2.pdf file3.pdf cat output merged.pdf
That's it. pdftk streams files from disk rather than loading them into RAM, so it handles PDFs of any size without memory issues. It also does more: split, rotate, encrypt, fill forms, stamp, and more. For scripted/automated PDF workflows on Linux, pdftk is the first tool to reach for.
Sell Custom Apparel — We Handle Printing & Free ShippingGhostscript (gs) — Already Installed on Many Linux Systems
Ghostscript is often pre-installed on Linux systems (check with gs --version). It can merge PDFs but the command is verbose:
gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf file3.pdf
The flags: -dBATCH exits after processing, -dNOPAUSE skips prompts, -q suppresses output, -sDEVICE=pdfwrite sets the output driver.
Ghostscript re-renders PDFs rather than copying page structures, which can occasionally affect output quality for complex PDFs (embedded fonts, transparency). For standard document PDFs it produces clean output. pdftk is generally preferred for pure merge tasks because it preserves the original PDF structure without re-rendering.
pdfunite — Lightweight Alternative from poppler-utils
pdfunite comes from the poppler-utils package, which is commonly installed as a dependency of many Linux applications:
sudo apt install poppler-utils # Ubuntu/Debian
Then:
pdfunite file1.pdf file2.pdf file3.pdf merged.pdf
Simpler command than ghostscript, and like pdftk it copies page structures without re-rendering. Suitable for straightforward merges. Less feature-rich than pdftk for complex operations.
Which Method to Use on Linux
| Situation | Best method |
|---|---|
| Occasional merge, no CLI preference | Browser tool (no install) |
| Regular command-line user | pdftk (simplest syntax) |
| Need to avoid any install | Browser tool or ghostscript if pre-installed |
| Very large files (1GB+) | pdftk or ghostscript (disk-based streaming) |
| Automated scripted workflow | pdftk in bash script |
| Sensitive documents, no internet | pdftk or pdfunite (fully offline) |
Linux users tend to prefer the terminal when available. But the browser tool fills the gap when you want to merge a few PDFs quickly without a package install or remembering pdftk's syntax. Both are fully local — no files leave your machine either way.
Merge PDFs on Linux — Browser or Command Line
Works in Chrome and Firefox on any distro. No package install required. Files stay on your machine.
Open Free PDF MergerFrequently Asked Questions
How do I merge PDF files on Ubuntu without installing software?
Open Chrome or Firefox and go to wildandfreetools.com/pdf-tools/merge-pdf/. The browser tool processes PDFs locally with no upload and requires no additional packages. Alternatively, if ghostscript or poppler-utils is already installed, use: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf
What is the best command-line PDF merger for Linux?
pdftk is the most commonly recommended. Install with: sudo apt install pdftk-java (Ubuntu/Debian). Usage: pdftk file1.pdf file2.pdf cat output merged.pdf. It handles any file size, preserves PDF structure without re-rendering, and has straightforward syntax.
How do I use ghostscript to merge PDFs on Linux?
Run: gs -dBATCH -dNOPAUSE -q -sDEVICE=pdfwrite -sOutputFile=merged.pdf file1.pdf file2.pdf file3.pdf. Ghostscript re-renders PDFs during merge, which can affect quality for complex documents. pdftk is preferred for preserving original PDF structure.
Does the browser PDF merger work on Linux?
Yes. Open wildandfreetools.com/pdf-tools/merge-pdf/ in Chrome, Chromium, or Firefox on any Linux distribution. The tool runs the same as on Windows or Mac — drag files in, click Merge, download. No packages to install beyond your existing browser.

