How to Compare Two PDFs
Choose an Original/Version A and a Revised/Version B. The comparison reads each file locally, extracts page text when available, renders paired pages, and creates both textual and visual difference summaries. Files are paired by page number; extra pages are explicitly reported instead of ignored.
Text Comparison vs Visual Comparison
Text comparison operates on PDF.js text extraction and can identify changed words and numbers in digital PDFs. Visual comparison works on rendered pixels, so it can detect layout, image, scanned-page and typography changes even when there is no extractable text. Neither mode should be treated as a substitute for legal review.
Text Normalization
Standard mode normalizes line endings and repeated spaces while preserving words and numbers. Strict mode keeps more formatting differences. Ignore Whitespace collapses whitespace more aggressively. These options exist because PDF text extraction can contain layout artifacts that are not meaningful edits.
How Visual Pixel Differences Work
Both pages are rendered into equal-sized comparison canvases while preserving aspect ratio and using neutral padding. The browser then compares RGB pixel values. The reported percentage is the number of differing pixels divided by comparable pixels; it is labelled a visual pixel difference, not a semantic accuracy score.
Compare PDFs with Different Page Counts
The default alignment is page 1 to page 1, page 2 to page 2 and so on. If Version B has additional pages, those are reported as Added Pages. If it has fewer, the unmatched Version A pages are reported as Missing Pages. This release does not advertise speculative smart page alignment.
Compare Scanned PDFs
Scanned PDFs are primarily images. Visual comparison still works, while text comparison may show little or nothing unless an OCR layer already exists. If textual comparison is important, run OCR PDF first on both versions using the same language/settings.
Why Some Visual Differences Are Tiny
Fonts and anti-aliasing can render with small pixel variations. Sensitivity settings adjust the per-pixel threshold so low-level rendering noise is less likely to dominate. High sensitivity detects smaller changes but can also increase noise.
Private Browser Comparison
PDF bytes, extracted text, difference pixels and SHA-256 hashes remain local. The downloadable report is generated in the browser with generic Version A and Version B labels, so filenames are not included by default. Hashes are calculated with Web Crypto and are never transmitted.
What a PDF Comparison Can and Cannot Prove
A comparison tool can show textual and visual differences, but it cannot determine the legal meaning of those differences. A changed total, date or paragraph may be important while a large pixel difference caused by a moved logo may be harmless. Results should therefore be treated as review evidence rather than an automated verdict that two documents are equivalent or fraudulent.
Extracted Text Comparison
PDF.js exposes the text items that a PDF viewer can extract. The comparison joins those items into normalized page text and then calculates added and removed word sequences. Standard normalization reduces repeated whitespace and line-ending noise. Strict mode preserves more formatting artifacts, while Ignore Whitespace is useful when the same text was reflowed without substantive wording changes.
Text extraction reflects how the PDF encodes text, not necessarily the visual reading order of every complex layout. Multi-column pages, unusual font encodings or scanned pages may produce incomplete or reordered text. Visual comparison provides a second signal for those cases.
Rendered Pixel Comparison
For visual comparison, both pages are rendered and placed on equal neutral canvases without stretching their aspect ratios. Each RGB pixel is compared against the corresponding pixel from the other version. A configurable threshold determines how large a channel difference must be before the pixel is marked changed. The result is a real differing-pixel count divided by the total comparable pixel count.
The percentage is deliberately labelled Visual pixel difference. It is not a semantic similarity score. A one-pixel shift of an entire paragraph can create many changed pixels even when the text is identical, while a single changed digit may occupy a small percentage but be substantively important.
Sensitivity and Rendering Noise
Font rasterization and anti-aliasing create small color differences around character edges. Low sensitivity uses a larger threshold and suppresses more of that noise. High sensitivity detects subtler visual changes but can flag harmless rendering differences. Recommended mode is a middle ground for ordinary document review.
Page Count and Alignment
The release uses predictable page-number alignment: page 1 is compared with page 1, page 2 with page 2, and so on. Extra pages are explicitly labelled Added or Missing. It does not advertise smart realignment because automatically guessing that page 8 in one file corresponds to page 9 in another can silently pair the wrong content.
Hashes and Reproducibility
SHA-256 hashes for Version A and Version B are calculated locally with Web Crypto. They help a reviewer record exactly which bytes were compared. The same file produces the same hash; any byte-level modification produces a different hash with overwhelming probability. Hashes are identifiers for file content, not an indication of whether two PDFs look the same.
Local HTML Comparison Report
The report contains generic Version A and Version B labels, page counts, settings, hashes and per-page text/visual metrics. Source filenames are intentionally omitted by default. Report generation uses the in-browser results and does not upload excerpts or difference images to a reporting service.
Scanned Documents and OCR
A scan can have no extractable text while still containing a complete visible document. In that case visual comparison remains useful. If textual comparison is required, run OCR on both versions first using consistent languages and settings, then compare those OCR-enabled copies while remembering that OCR itself can introduce recognition differences.
Reviewing a Comparison Efficiently
Start with the summary to identify pages where text or rendered pixels changed, then open those page tabs for detail. A page with no text change but a high visual difference may contain a moved image, changed chart, signature or scanned content. A page with a small visual percentage but an added or removed number may deserve more attention than the percentage suggests.
When two PDFs were generated by different applications, page geometry, embedded fonts and anti-aliasing can differ even if the wording is the same. Use the text result and side-by-side render together. If a layout-only change is expected, lower visual sensitivity can reduce noise; if detecting subtle graphical edits is the goal, High sensitivity may be appropriate.
The downloadable report is a snapshot of the tool's calculations and settings. It is useful for review notes, but it does not preserve a chain of custody by itself. For formal workflows, record the two SHA-256 hashes and store the compared source files according to your organization's document-control process.
Frequently Asked Questions
Can I compare PDF text?
Yes when the PDF contains extractable text.
Can I compare PDFs visually?
Yes. Matching pages are rendered and compared pixel by pixel.
What does the difference percentage mean?
It is the percentage of comparable rendered pixels that differ beyond the selected threshold.
Can I compare scanned PDFs?
Yes visually. Text comparison may be empty without OCR.
What if page counts differ?
Extra pages are explicitly labelled Added or Missing.
Are the PDFs uploaded?
No. Both documents and all comparison data stay in the browser.
Can I download a report?
Yes. An HTML comparison report is generated locally.
Is this a forensic comparison?
No. It is a review aid; interpretation of changes still requires human judgment.