Skip to content
DevToolKit

PDF Compare

Compare two PDF files side by side online for free. Highlight differences in text and layout. All processing in your browser — no files uploaded.

pdf

Drop original PDF here

The baseline document

pdf

Drop modified PDF here

The revised document

Processed locally
Processed locally
Was this tool helpful?

How to Use

Compare two PDF documents visually by following these four steps:

  1. Upload the original PDF — Drag and drop or click the first dropzone to load the baseline document. The tool reads the file locally in your browser and displays its page count and file size immediately. No data is transmitted to any server during this step or any subsequent step.
  2. Upload the modified PDF — Load the revised version in the second dropzone. Both files remain entirely on your device throughout the comparison process. You can upload PDFs of any size, though documents with hundreds of pages at high DPI will require more processing time and memory.
  3. Adjust settings and compare — Use the DPI dropdown to set rendering resolution: 72 DPI runs fast but may miss fine details, 150 DPI (default) captures standard text changes reliably, and 300 DPI detects even hairline differences in vector graphics. The threshold slider controls pixel sensitivity — lower values flag subtle anti-aliasing differences while higher values only highlight significant content changes. Click the "Compare PDFs" button to begin the page-by-page analysis.
  4. Review the results — The summary bar shows how many pages contain differences. Navigate between pages using the thumbnail strip or arrow buttons. Switch between three view modes: Side by Side displays the original, modified, and difference panels simultaneously; Overlay shows the diff highlights painted over the original content; and Diff Only isolates the changed regions for focused inspection. Each page displays a percentage badge indicating the proportion of changed pixels.

Pages that exist in one PDF but not the other are compared against a blank white canvas and marked as 100% different, making added or removed pages immediately visible. Click any page thumbnail in the navigation strip to jump directly to it.

About This Tool

PDF comparison is the process of identifying visual differences between two versions of a document. Unlike text-based diff tools that compare raw character streams, visual PDF comparison operates on the rendered output of each page, catching changes that text diff tools miss entirely: shifted images, altered fonts, modified colors, resized diagrams, moved annotations, and reformatted layouts. This approach treats each page as a bitmap and analyzes it pixel by pixel, producing a comprehensive map of every visual change regardless of its origin.

This tool uses pdfjs-dist (Mozilla's PDF.js) to render each page from both documents onto HTML canvas elements at the configured DPI. The rendering pipeline handles embedded fonts, vector graphics, transparency layers, and color spaces, producing output that matches what a PDF viewer would display on screen. Each page pair is then compared at the pixel level using a color distance algorithm that measures the perceptual difference between corresponding pixels in RGB color space.

The comparison algorithm calculates the sum of absolute RGB channel differences — abs(R1-R2) + abs(G1-G2) + abs(B1-B2) — for every pixel position. Pixels whose total difference exceeds the threshold are marked as changed and highlighted with a magenta overlay at 50% opacity blended over the original page content. Pixels that fall below the threshold are dimmed to 70% brightness, making the highlighted differences visually prominent against the subdued background. The default threshold of 30 ignores minor anti-aliasing artifacts and sub-pixel rendering differences while reliably detecting content changes.

When page dimensions differ between the two PDFs, the tool normalizes them by scaling the smaller page to match the larger one, preventing false positives from simple page size changes while still detecting content modifications. Pages that exist in one PDF but not the other are compared against a blank white canvas, making added or removed pages immediately visible in the results. Related tools include the Text Diff tool for comparing raw text content, PDF Split for extracting specific pages, and PDF Extract Pages for pulling individual pages from a document.

The three view modes serve different review workflows: Side-by-Side places original, modified, and diff renderings next to each other for natural visual scanning across all three perspectives simultaneously. Overlay shows exactly where on the page changes occurred by highlighting them in the context of the original content. Diff Only isolates the changed regions for focused review, useful when scanning for specific modifications in dense documents. All canvas operations use the willReadFrequently optimization hint to prevent Chrome from disabling GPU acceleration after repeated pixel reads.

Render DPI controls the resolution of the comparison. At 72 DPI, the comparison runs fast but may miss fine details like periods, commas, or thin line differences. At 150 DPI (the default), the tool captures standard body text changes reliably. At 300 DPI, even hairline differences in vector graphics and small-point footnotes are detected, though processing time and memory usage increase proportionally with the square of the DPI ratio. For multi-page documents with dozens of pages, 150 DPI provides the best balance of accuracy and speed. You may also find the Rasterize PDF tool useful for converting PDFs to image-based pages, or the PDF to Images converter for exporting individual pages as image files.

Why Use This Tool

Visual PDF comparison addresses critical needs across several professional workflows where detecting every change matters:

  • Contract and legal review — Lawyers and paralegals verify that redlined changes were applied correctly by comparing the marked-up draft against the clean version. Visual comparison catches formatting shifts, margin changes, and font substitutions that text-only diff tools ignore, protecting against unauthorized modifications to legally binding documents.
  • Pre-press and print production — Graphic designers compare PDF proofs before and after corrections to confirm that only the intended changes were made. A single misplaced image or shifted text block can trigger an expensive reprint, making pixel-level verification essential for high-value print jobs including packaging, catalogs, and advertising materials.
  • Regulatory compliance — Pharmaceutical companies, financial institutions, and government agencies must track every change to regulated documents. Visual comparison provides an auditable record of modifications between document versions, supporting 21 CFR Part 11, SOX, and similar compliance requirements where document integrity is legally mandated.
  • Academic and research publishing — Authors compare their submitted manuscript against the publisher's typeset proof to catch introduced errors in equations, figures, table layouts, and citation formatting that occurred during the typesetting process. A single misrendered equation can invalidate scientific results.
  • Software documentation and QA — Quality assurance teams verify that generated PDF reports, invoices, and certificates match their expected output across software releases. This catches regression bugs in PDF generation code before they reach production, preventing incorrect data from being distributed to customers.

Both PDF files are processed entirely within your browser using client-side rendering and canvas-based pixel analysis. Your documents are never uploaded to any server, making this tool safe for confidential contracts, proprietary designs, patient records, financial reports, and any other sensitive material. The comparison results, including all rendered page images and diff overlays, exist only in browser memory and are discarded when you close the page or start a new comparison. For other privacy-focused document tools, see PDF Compress and PDF Sanitize.

FAQ

How does PDF comparison work?
The tool renders both PDFs and highlights visual differences page by page, making it easy to spot changes in text, images, and layout.
Can I compare specific pages?
Yes. Select which pages to compare from each document for focused review.
Are my PDFs uploaded?
No. Both files are processed entirely in your browser. Nothing is sent to any server.