Compare PDF documents privately and securely in your browser. No uploads, no servers, just local processing.
npm install @jamesmontemagno/pdf-diff> 🔒 Compare PDF documents privately and securely in your browser. No uploads, no servers, 100% client-side processing.



Try it now at www.pdf-diff.com →
npx pdf-diff for command-line comparisonsCompare PDFs directly from your terminal with zero installation:
``bashBasic comparison
npx pdf-diff original.pdf modified.pdf
#### CLI Options
| Option | Description | Default |
|--------|-------------|---------|
|
-r, --report | Report type: html, pdf, or both | both |
| -o, --out | Output directory for reports | ./pdf-diff-report |
| --open / --no-open | Open HTML report in browser after completion | --open |
| -f, --format | Output format: text, json, or junit | text |
| --fail-on-diff | Exit with code 1 if differences are found | - |
| -p, --pages | Pages to compare (e.g., 1-3,5,7) | All pages |
| -t, --threshold | Change percentage threshold for failure | - |
| -i, --interactive | Interactive mode with guided prompts | - |$3
1. Visit www.pdf-diff.com
2. Upload or drag your original PDF
3. Upload or drag your modified PDF
4. View comparison results instantly
5. Switch between view modes as needed
6. Export results to PDF if desired
$3
`bash
Clone the repository
git clone https://github.com/jamesmontemagno/pdf-diff.git
cd pdf-diffInstall dependencies
npm installStart development server
npm run devBuild for production
npm run buildPreview production build
npm run previewRun linter
npm run lint
``- React 19 - Modern UI framework
- TypeScript - Type-safe development
- Vite - Lightning-fast build tool
- PDF.js - Mozilla's PDF rendering engine
- jsPDF - PDF generation for exports
- diff - Text comparison algorithm
- 🟢 Green - Additions (new content)
- 🔴 Red - Deletions (removed content)
- ⚪ White/Gray - Unchanged content
PDF Diff is built with privacy as the top priority:
1. No Server Communication - Files are processed entirely in your browser
2. No Data Storage - Nothing is saved or cached
3. No Tracking - No analytics or user tracking (except standard web analytics)
4. No Third-Party APIs - All processing happens locally
5. Open Source - Full transparency, audit the code yourself
Contributions are welcome! Please feel free to submit a Pull Request.
MIT License - See LICENSE for details.
James Montemagno
- Website: montemagno.com
- GitHub: @jamesmontemagno
- Twitter: @JamesMontemagno
Give a ⭐️ if this project helped you!
---