Every time I need to merge PDFs, the same thing happens. I Google "merge PDF online," click the first result, and get hit with:
- "Upload your files to our secure server"
- "Free for files under 5MB"
- "Sign up to download"
No thanks.
I deal with contracts, invoices, and project docs regularly. I don't want any of that sitting on someone else's server, even temporarily. So I built my own PDF merger that runs 100% in your browser. No uploads. No servers. No accounts.
How It Works
The tool lives at devtools-site-delta.vercel.app/pdf-merge and uses pdf-lib, a pure JavaScript library that can create and modify PDF documents entirely client-side.
Here's the core idea. When you drop files into the tool, it reads them as ArrayBuffers using the File API, then pdf-lib stitches them together:
import { PDFDocument } from 'pdf-lib';
async function mergePDFs(pdfFiles) {
const mergedPdf = await PDFDocument.create();
for (const file of pdfFiles) {
const arrayBuffer = await file.arrayBuffer();
const pdf = await PDFDocument.load(arrayBuffer);
const pages = await mergedPdf.copyPages(pdf, pdf.getPageIndices());
pages.forEach(page => mergedPdf.addPage(page));
}
const mergedBytes = await mergedPdf.save();
return new Blob([mergedBytes], { type: 'application/pdf' });
}
That's basically it. PDFDocument.create() makes a new empty PDF, then you loop through each input file, copy all its pages, and add them to the merged document. The whole operation happens in memory inside your browser tab.
Why Client-Side Matters
When I say "no upload," I mean it literally. Open your browser's Network tab while using the tool. You'll see zero outbound requests carrying your PDF data. The files never leave your machine.
This matters for:
- Legal documents — NDAs, contracts, anything sensitive
- Financial records — tax forms, bank statements
- Medical files — HIPAA doesn't care about "secure servers"
- Just... privacy — it's your data, keep it yours
Drag, Drop, Reorder, Download
The UX is dead simple. Drag your PDFs in, reorder them however you want, hit merge, and your browser downloads the result. The whole thing takes about 2 seconds for typical documents.
I also handle edge cases that trip up other tools:
- PDFs with different page sizes
- Encrypted PDFs (if you have the password)
- Large files that would hit upload limits elsewhere
I Built a Splitter Too
Same idea in reverse. devtools-site-delta.vercel.app/pdf-split lets you extract specific pages from a PDF. Need pages 3-7 from a 50-page document? Done. Want to pull out just one page? Also done.
The splitting logic is even simpler:
async function splitPDF(file, pageNumbers) {
const arrayBuffer = await file.arrayBuffer();
const sourcePdf = await PDFDocument.load(arrayBuffer);
const newPdf = await PDFDocument.create();
// pageNumbers is zero-indexed
const pages = await newPdf.copyPages(sourcePdf, pageNumbers);
pages.forEach(page => newPdf.addPage(page));
return await newPdf.save();
}
You select which pages you want, it copies just those pages into a new PDF, and you download the result. Again, nothing leaves your browser.
Word to PDF
I also built a Word to PDF converter that converts .docx files right in the browser. Same philosophy — your documents stay on your machine.
The Bigger Picture
These PDF tools are part of a larger collection I've been building at devtools-site-delta.vercel.app. There are 500+ tools now, all free, all running client-side where possible. JSON formatters, image compressors, regex testers, color pickers — the works.
I got tired of bouncing between sketchy ad-filled sites for basic tasks, so I just... built everything in one place.
If you're a developer who works with PDFs programmatically, pdf-lib is genuinely excellent. The docs are solid, it handles most PDF operations you'd need, and it runs in Node.js too if you need server-side processing.
Bookmark the merger if you deal with PDFs regularly. Your files stay yours.
Links:
Top comments (0)