Compare Two PDFs
Compares two PDFs' page count, metadata, page dimensions, AND actual text content — with a real color-coded word-level diff showing exactly what changed, page by page.
How to Use This Tool
Upload the first PDF into the 'File A' slot.
Upload the first PDF into the 'File A' slot.
Upload the second PDF into the 'File B' slot.
Upload the second PDF into the 'File B' slot.
Pro Tip
For genuinely scanned or photographed PDFs with no existing text layer, run them through this site's OCR PDF tool first — it now performs real optical character recognition and produces a searchable text layer — before comparing, since text extraction here (like any PDF text tool) can only compare text that already exists in the file.
About This Tool
When to Use
- Finding exactly which clauses changed in a lawyer's redlined contract compared to the version sent out for review.
- Checking what was actually added to a policy document since last year, page by page, with changes highlighted.
- Quickly checking whether a resent PDF has the same page count and title/author metadata as the original, as a basic sanity check.
How It Works
Both files are loaded with pdf-lib for page count, metadata (title, author, subject, creator), and page-dimension checks. Separately, each page's text is extracted via pdf.js (the same engine used els...
Key Details
Compare Two PDFs checks two files for both structural and genuine content differences. It confirms whether the two PDFs have the same page count, whether four metadata fields (title, author, subject, ...
How it works
Both files are loaded with pdf-lib for page count, metadata (title, author, subject, creator), and page-dimension checks. Separately, each page's text is extracted via pdf.js (the same engine used elsewhere on this site for text extraction), and corresponding pages are compared with a real word-level diff: words are aligned using a longest-common-subsequence algorithm, and any unmatched spans are marked as additions or removals. The results screen shows Pages/Metadata/Text Content match indicators plus a color-coded (green added, red removed) breakdown for every page where the text actually differs.
Worked example
A legal assistant receives a lawyer's redlined 15-page contract and wants to know exactly what changed from the version sent out for review. Running both PDFs through Compare Two PDFs now shows the Text Content indicator as 'Differs' and lists which specific pages changed, with the changed wording on each page shown with removed text struck through in red and added text highlighted in green — the exact redline-style comparison this tool's name implies, not just a page-count and metadata check.
Interpreting your result
A 'Documents are identical' result now genuinely means page count, metadata, page dimensions, AND every page's text content all matched — this state was previously unreachable due to a display bug that always showed at least one 'difference' even for identical files, which is now fixed. If Text Content shows 'Differs,' scroll to the color-coded diff section to see exactly which pages changed and what the specific wording differences are.
Compare Two PDFs FAQ
Does this tool compare the actual text content of the two PDFs now?
Yes — genuinely. Each page's text is extracted via pdf.js and compared with a real word-level diff (the same longest-common-subsequence technique this site's Diff Checker uses for code), showing exactly which words were added or removed on each page. This is on top of the existing page-count, metadata, and dimension checks.
Can I compare scanned PDFs or image-based documents?
Text comparison only works on pages that have real, existing text — a genuinely scanned or photographed page with no text layer will show as having no comparable text. If you need to compare scanned documents, run each one through this site's OCR PDF tool first (which now performs real optical character recognition) to give them a genuine, searchable text layer before comparing.
What differences does the comparison actually show?
Page-count and metadata mismatches as before, plus — now — a color-coded, page-by-page word-level diff: text that was removed appears struck through in red, text that was added appears highlighted in green, and unchanged text appears plain. Each page with real text differences gets its own diff section.
What if the two PDFs have different numbers of pages?
The tool still reports the two page counts and flags them as differing overall. Text comparison proceeds for however many pages both documents have in common (e.g. the first 10 pages of a 10-page and a 12-page document), so you can still see content differences on the pages that do correspond.
How accurate is the comparison?
The page count, metadata, and page-dimension checks are exact, reading values directly via pdf-lib. The text comparison is a genuine word-level diff of pdf.js's extracted text — accurate for what it compares, though extraction quality depends on how the source PDF encodes its text (unusual encodings or ligatures can occasionally affect word boundaries slightly).
Can I download a comparison report?
No — results are shown on-screen only, in the Pages/Metadata/Text Content summary, the differences list, and the color-coded page-by-page diff beneath it. There's no export or download option for the comparison results themselves.
Master Your Entire Toolkit
Access 500+ specialized calculators and tools designed for precision. No sign-up required, 100% free.
Built and reviewed by the Toolzip Team · Based on pdf-lib documentation and pdf.js