Compare PDF
NewCompare two PDFs locally.
Files to compare
0/2 selectedBoth PDFs stay in your browser.
Uses embedded selectable text; scanned pages need OCR first.
This is not a pixel-perfect visual comparison.
About this tool
Compare two PDFs in your browser by page count, file size, and selectable text. Scanned pages need OCR first; this is not a pixel-perfect visual diff.
This tool processes files entirely on your device. Nothing is uploaded to a server.
More details
Compare PDF reads the selectable text of two versions of a document and writes one report of what changed. Lines only in the second file are marked with a plus, lines only in the first with a minus, and above that line-by-line diff the report lists both page counts, both sizes in bytes and the number of changed lines. When every line agrees, the result is headed Selectable text matches.
The comparison runs inside your browser tab, where pdf.js reads the text of both files, and neither PDF is uploaded. Whichever PDF you add first is the baseline, so add the older version first: the page and byte differences are counted from it to the second one. It compares exactly two files, and a file over 100 MB is turned away before it is opened.
This is a text comparison, not a visual one: a moved image or a changed colour will not appear, and a new font or margin shows up only where it makes the text wrap differently. Changes are reported a whole line at a time; runs of spaces and tabs count as one space, and indentation, blank lines and page breaks are ignored. A scan with no text layer has nothing to compare until it has been through OCR.
When to use it
Check what the other side edited in a contract
When a revised agreement comes back with no tracked changes, compare it against the version you sent. Each altered line appears twice, once removed and once added; a clause that gained words may re-wrap, so later lines in that paragraph can show as changed too.
Confirm a re-export kept the wording
After regenerating a report from its source, compare old and new. A Selectable text matches heading means every line of selectable text agrees once spacing, indentation and blank lines are set aside. If the sizes still differ, something other than the wording changed, such as spacing, an image, an embedded font or an export setting, and this tool cannot say which.
Spot a quietly changed figure
A price, date or total that changed in the text layer flags the line it sits on. A number that is part of a picture, such as a chart pasted in as an image, is not text and will not be caught.
See whether pages were added or dropped
The Pages tile puts the two page counts side by side, first file → second, so an inserted appendix or a missing schedule shows up before you read a single line. It compares totals only: one page added and another removed leaves the counts equal.
How it works
1Add the two PDFs
Drop the files onto the box that reads "Drop two PDFs here, or", or click browse. The first file added fills the PDF 1 slot and becomes the baseline; if you pick both at once, check that the first card (on the left, or on top on a narrow screen) holds the original.
2Check the Files to compare list
Each card shows the file name, page count and size, and the counter reads 2/2 selected. The X on a card removes that file; remove PDF 1 and the other file moves into its slot.
3Press Compare PDFs
It stays disabled until both slots are filled. Tiles for Pages, Size delta and Changed lines sit above the full report, whose Bytes line gives both exact sizes and a signed difference.
4Download the report
Download comparison report saves the whole report as a text file named after both PDFs, for example draft-vs-final-comparison.txt. Start over clears the result and both slots for a new pair, without leaving the page.
Common questions
Does Compare PDF highlight changes on the pages themselves?
No. The result is a text report, not marked-up pages: unchanged lines are indented two spaces, lines only in the second PDF start with +, and lines only in the first start with -. It does not name the page a change sits on, so search the PDF for that line's text.
Why is a whole line flagged when only one word changed?
The comparison works line by line: if any character on a line differs, the old line is listed as removed and the new one as added. The same happens when the wording is identical but the text wraps differently, for example after a font or margin change, because the lines no longer match.
What if one of the two PDFs is a scan?
This tool reads selectable text only. When one file is a scan with no text layer, it does not list the other file's text as changed: the result is headed with that file's name and "has no selectable text", Changed lines reads Not compared, and the report tells you to run OCR PDF on that file first. Two scans produce a report saying no selectable text was found in either PDF. OCR PDF can add a text layer, but unlike this tool it uploads the scan over TLS to pdf.xyz's secure server, which deletes it when the job finishes; the OCR'd copy's link expires after 60 minutes and a daily storage rule erases the stored copy after that. Any OCR misreading will then show up here as a difference.
Are my PDFs uploaded to compare them?
No. Both files are opened and compared by your browser on your own device. Each PDF can be at most 100 MB; the size is checked before the file is read, and a larger file is listed under Some files were skipped with the reason.
What if a PDF has a password, or I add a third one?
An encrypted PDF is refused as it is added, listed under Some files were skipped with a note to unlock it first. That includes a file that opens freely but restricts printing or editing, since those restrictions are stored as encryption. A third PDF is skipped too, because the tool takes exactly two; remove a loaded file first.
Does Compare PDF work offline?
Not fully. The page and its processing engine load over the network, and parts of the engine are fetched the first time a step needs them. The processing itself runs on your device. Chinese, Japanese or Korean text whose font is not embedded in the PDF needs a character map, downloaded from our site the first time it is needed, and that step needs a connection.
How large can my file be?
Up to 100 MB per file.
What does Compare PDF compare?
The selectable text, line by line, plus the page count and the file size. A change to images, layout, fonts or colors that leaves the text the same does not show up.
What counts as a change in Compare PDF?
A line of selectable text that is in one PDF and not the other. Lines only in the first PDF are listed as removed (-), and lines only in the second as added (+). Extra spaces inside a line and blank lines are ignored.
Can Compare PDF compare scanned PDFs?
Not on their own: a scanned page is a picture with no text inside it, so there is nothing to compare. Run both files through OCR PDF first, then compare the results.
Related tools
All toolsGuides
All guidesNo sign-up required. Your files stay on your device until you run a tool.