npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

@jamesmontemagno/pdf-diff

v1.0.4

Published

Compare PDF documents privately and securely in your browser. No uploads, no servers, just local processing.

Readme

PDF Diff

🔒 Compare PDF documents privately and securely in your browser. No uploads, no servers, 100% client-side processing.

Live Demo License GitHub stars

PDF Diff Screenshot

Try it now at www.pdf-diff.com →

✨ Features

🔐 Privacy-First Design

  • 100% Private & Secure - Your PDFs never leave your device
  • No Server Uploads - Zero data transmission, zero risk
  • Works Offline - Once loaded, no internet connection required
  • Open Source - Inspect the code yourself to verify our privacy claims

📊 Powerful Comparison Views

  • Side-by-Side View - Compare documents with synchronized scrolling
  • Unified View - See all changes inline with color coding
  • Additions Only - View only what was added
  • Removals Only - View only what was removed
  • Changes Only - See additions and removals side-by-side per page

🎯 Advanced Features

  • CLI Support - Use via npx pdf-diff for command-line comparisons
  • Multi-Page Support - Compare entire documents page by page
  • Show All Pages - View all changes across all pages at once
  • Export to PDF - Save comparison results as a formatted PDF report
  • Page Navigation - Quick navigation between pages
  • Statistics Dashboard - Get instant insights on changes
  • Dark/Light/System Theme - Choose your preferred appearance
  • Visual HTML/PDF Reports - Generate shareable diff reports

📱 User Experience

  • Responsive Design - Works perfectly on desktop, tablet, and mobile
  • Drag & Drop - Easy file upload with drag and drop support
  • Real-time Processing - Instant comparison results
  • Clean Interface - Intuitive and clutter-free design

🚀 Getting Started

Quick Start with CLI (npx)

Compare PDFs directly from your terminal with zero installation:

# Basic comparison
npx pdf-diff original.pdf modified.pdf

# Generate only HTML report
npx pdf-diff original.pdf modified.pdf --report html

# CI-friendly: exit with code 1 if differences found
npx pdf-diff original.pdf modified.pdf --fail-on-diff

# Output as JSON for programmatic use
npx pdf-diff original.pdf modified.pdf --format json

# Interactive mode
npx pdf-diff --interactive

CLI Options

| Option | Description | Default | |--------|-------------|---------| | -r, --report <type> | Report type: html, pdf, or both | both | | -o, --out <dir> | Output directory for reports | ./pdf-diff-report | | --open / --no-open | Open HTML report in browser after completion | --open | | -f, --format <type> | Output format: text, json, or junit | text | | --fail-on-diff | Exit with code 1 if differences are found | - | | -p, --pages <spec> | Pages to compare (e.g., 1-3,5,7) | All pages | | -t, --threshold <float> | Change percentage threshold for failure | - | | -i, --interactive | Interactive mode with guided prompts | - |

Using the Web App

  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

Development

# Clone the repository
git clone https://github.com/jamesmontemagno/pdf-diff.git
cd pdf-diff

# Install dependencies
npm install

# Start development server
npm run dev

# Build for production
npm run build

# Preview production build
npm run preview

# Run linter
npm run lint

🛠️ Tech Stack

  • 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

🎨 Color Coding

  • 🟢 Green - Additions (new content)
  • 🔴 Red - Deletions (removed content)
  • White/Gray - Unchanged content

🔒 Privacy & Security

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

🤝 Contributing

Contributions are welcome! Please feel free to submit a Pull Request.

📄 License

MIT License - See LICENSE for details.

👨‍💻 Author

James Montemagno

🌟 Show Your Support

Give a ⭐️ if this project helped you!


Start comparing PDFs now →