Compare PDFs
Put two PDFs side by side and see what changed — line by line, or pixel by pixel.
Drop a PDF or click to select
Drop a PDF or click to select
Add a PDF to both slots to begin. Comparison starts automatically.
About Compare PDFs
Drop the original into slot A and the revision into slot B. Both documents are opened in this browser tab, the text layer is read out of every page, and the two are compared in two independent ways: a line-level text diff and a pixel overlay. Page 3 is always compared with page 3, and you step through the document with the pager or the numbered strip above it. Swap either file at any time with Replace; the previous result is cleared while the new pair is read, so nothing you see on screen is ever left over from the file you just replaced.
Text diff: what the words say
A PDF page contains no lines. It contains fragments of text, each pinned to a coordinate, so the first job is to rebuild lines by grouping fragments that share a baseline and reading them left to right. Those reconstructed lines are then compared with a longest-common-subsequence algorithm — the same family of comparison a source-control diff uses — which finds the largest set of lines the two pages have in common and reports everything else as removed or added. Runs of removals and insertions are paired up into a single row so the two columns stay level, which is what lets you read across from an old clause to its replacement.
Red on the left is a line only document A has. Green on the right is a line only document B has. Amber on both sides is a line that was replaced. The numbered strip carries the change count for each page, so a 200-page contract with one edited paragraph tells you where to look before you have read a word. The Ignore letter case toggle relaxes the comparison key without altering what is displayed. Spacing is not part of that choice: runs of whitespace are collapsed while the lines are being rebuilt from the page, before any comparison happens, so a line respaced from one space to two reads as unchanged in this mode whether the box is ticked or not. Visual mode is where a spacing-only edit shows up.
Visual diff: what the page looks like
Visual mode renders page N of both files at one shared scale onto one shared canvas the size of the larger page, fills anything outside a page with flat grey so that a smaller sheet does not silently match the other document's white paper, then walks the two pixel buffers together. A pixel counts as changed when any colour channel differs by more than the tolerance, and the third panel shows the base page washed out with every changed pixel stamped in red. The headline figure is the share of the canvas that moved. This is the mode that catches a replaced photograph, a shifted logo, a different signature, a recoloured table or a chart redrawn with identical labels — none of which touch the text layer at all.
The tolerance slider exists because two PDFs exported separately from the same source are never bit-identical: glyph rasterisation, anti-aliasing and JPEG re-encoding all wobble by a few levels. Raise the tolerance until that speckle disappears. What it cannot do is hide a stroke that moved a whole pixel — black on white is a 255-level difference, so a document re-exported with a sub-point shift will always show a little text-edge noise, and that is the honest reading rather than a fault. Drop the tolerance towards zero only when you are comparing two copies of the same generated file and want to know whether anything at all was touched.
Where each mode misleads
- Reflow floods the visual diff. One inserted sentence pushes everything below it down, and every displaced line reads as changed. The edit is at the top of the red region.
- Multi-column pages merge. Two columns share baselines, so the left and right column of a line are joined into one string. Consistent between both documents, but it is a horizontal band of the page rather than a sentence.
- Scans have no text. A photographed or scanned page contains an image, so the text panel will be empty. Visual mode is the correct tool for two scans.
- An inserted page ruins alignment. Comparison is strictly positional, so everything after an insertion is compared against the wrong page. Trim matching ranges with Split PDF first.
- Pages past about 2,000 lines drop to an approximate diff. The exact comparison needs a table of every line against every line, which stops being affordable somewhere above two thousand a side, so such a page is matched by position instead and says so in an amber note under the table. Ordinary documents never reach this; a machine-generated log or a single enormous table can.
Privacy and limits
Both files are read with the File API and parsed by pdf.js inside this tab. Neither document is uploaded or written to browser storage, and no copy of either survives closing the page — the page itself loads analytics and advertising scripts as most of the web does, but nothing from your files goes anywhere, and the comparison works with the network switched off. There is no export: the comparison is on screen only, so copy the text panels or screenshot the overlay if you need to pass it on. Encrypted documents cannot be parsed — run Unlock PDF first. Very large documents are limited by memory rather than by any cap here, since the visual pass holds two full-page pixel buffers at once; if a long file struggles, compare it in sections.
A real line-level diff, page by page
Text is pulled out of both files, rebuilt into lines by baseline coordinate, then run through a longest-common-subsequence comparison. A removed line is shaded red in the left column only, an added line green in the right column only, a replaced line amber on both sides, and unchanged lines stay level with each other so your eye can track across.
Pixel overlay for everything text cannot see
Visual mode draws page N of both documents at exactly the same scale, compares them pixel by pixel with an adjustable tolerance, and reports the percentage of the page that moved. A shifted logo, a changed signature or a redrawn chart shows up here even though the text layer is identical.
Both files stay on your machine
Parsing and rendering happen in this tab with pdf.js. Neither document is uploaded, queued or stored, which is what makes it usable on a contract redline or an unreleased set of accounts.
Frequently Asked Questions
Which mode should I use?
Start with text mode — it tells you what the words actually say, line by line, and it is the only one that survives a page reflow. Switch to visual mode when the text comes back identical but the pages plainly are not: a moved logo, a swapped photograph, a different signature block, a chart redrawn with the same labels, or a colour change. The two modes answer different questions and it is normal for one to report a difference the other cannot see.
Why did one small edit turn the whole page red in visual mode?
Because a pixel comparison has no idea what a paragraph is. Insert a sentence at the top and every line beneath it shifts down a few points; every one of those lines is now drawn over what used to be white paper, so every one of them counts as changed. That is the honest answer and there is no setting that fixes it. When you see a page that is red from the edit downwards, the edit is at the top of the red region — and text mode will tell you exactly what it was.
Text mode says the pages are identical but they clearly look different.
Text mode compares characters and nothing else. Font, size, weight, colour, spacing, images, tables, ruled lines, headers, watermarks and page geometry are all invisible to it, because none of them change the string a line produces. That is usually a feature — you want to know whether the numbers in a clause changed, not whether somebody restyled the heading — but when appearance is the thing under review, visual mode is the one to trust.
One of my PDFs shows no text at all.
It is a scan. A scanned or photographed page holds an image of writing, not writing, so there is no text layer to read and text mode has nothing to compare. Visual mode still works and is the right tool for two scans of the same form. If you need the words, run the pages through PDF to PNG and then Image to Text to recognise them, and compare the recognised text with Diff Viewer — bearing in mind that OCR errors will show up as differences of their own.
The two documents have different page counts. What happens?
Comparison is positional: page 3 is compared with page 3, always. The stepper runs to whichever document is longer, and pages that exist in only one file are reported as entirely added or entirely removed. This means an inserted page early on knocks everything after it out of alignment and the report becomes noise. When that happens, compare the sections either side of the insertion separately, or pull matching ranges out with Split PDF first.
Can I download a report of the differences?
No. There is no PDF, CSV or annotated-output export here — the comparison lives on screen only. You can select and copy the text panels like any other page content, and take a screenshot of the visual overlay. If you need a shareable redline, the usual route is to compare the source documents in the word processor they came from, since a PDF has already thrown away the revision structure that a real redline needs.
The lines came out jumbled, or two columns are woven together.
Lines are rebuilt by grouping text fragments that share a baseline, which is exact for a single-column page and approximate for anything else. A two-column layout puts the left and right columns on the same baselines, so they merge into one line each. Sidebars, footnote blocks, rotated text and table cells behave the same way. The diff is still useful — the merged lines are merged consistently in both documents — but read it knowing that a "line" here means a horizontal band of the page.
Why does the visual difference never reach zero, even on the same file twice?
It should reach zero on genuinely identical files, and it does. Small non-zero readings come from two documents that were exported separately from the same source: font rasterisation and anti-aliasing differ by a pixel here and there, and JPEG images re-encode slightly differently. That is what the tolerance slider is for, within limits: it filters colour wobble — JPEG speckle, a slightly different grey — because those are small per-channel differences. It cannot filter a glyph stroke that lands on a different pixel, because that is black against white, a difference of the full 255 levels that no setting below the maximum useful range can mask. So raise it until the colour speckle goes and expect a fraction of a per cent of text-edge noise to survive on any two separately produced files; the default is deliberately forgiving, and pushing it to the strict end will light up almost anything.
Are my documents uploaded anywhere?
No. Both files are read with the File API, parsed by pdf.js inside this tab and rendered onto canvases in your own browser. Nothing is transmitted and nothing is written to storage — closing the tab is all the cleanup there is. Encrypted PDFs are the one thing that will not open at all: remove the password with Unlock PDF first, since a parser cannot read a document it cannot decrypt.