PDF Diff
Compare two PDF revisions privately, in your browser.
- Role
- Personal project
- Started
- Aug 2026
- Stack
- TypeScript, React, PDF.js
- Licence
- MIT
- Links
- pdfdiff.appSource on GitHub


What it is
It compares two PDF revisions locally in the browser: a pixel overlay, side-by-side pages, a slider that reveals one revision under the other, and highlighted text changes. It also ships a headless CLI (@pdfdiff/cli) that writes overlays and JSON reports, so the same comparison can run in CI or from an agent.
How it’s built
The comparison logic is split into workspace packages so it can be reused without the app. @pdfdiff/core holds the raster, alignment, connected-region and semantic text comparison algorithms, and has no DOM or PDF.js dependency. Separate adapters handle PDF.js text extraction, browser rendering, a React viewer and the CLI.
Aligning and diffing two rendered pages is the expensive half of a comparison: roughly 3.9 s of a 10 s, 43-page run, against 2.5 s of canvas rendering. That work runs on a Web Worker, so rendering and pixel work overlap and the UI keeps painting. Page rasters are transferred rather than copied, and peak memory stays at two pages of rasters (about 72 MB at the standard 3 MP budget) however long the document is.
Privacy
The site is static, served from Cloudflare with no upload endpoint. PDFs are processed entirely in the browser; the recent-comparison history stores only file names, sizes, dates and settings.