Compare Two PDFs
See two PDFs side by side with a draggable slider, plus a line-by-line text diff per page. All processing happens in your browser. Your files never upload anywhere.
How to Compare Two PDFs
Comparing document revisions is a daily chore for lawyers reviewing contract redlines, editors checking proofs, and teams reviewing reports. The classic approach is opening two windows and flicking between them, which misses small changes. This tool gives you two complementary views: a visual slider that overlays the rendered pages so layout changes jump out, and a text diff that lists exactly which lines were added or removed.
Choose the original PDF as file A and the revised PDF as file B. Both are loaded into your browser memory and never sent to any server.
Drag the divider across the page to sweep between the two versions, or move the slider underneath. Step through pages with Prev and Next.
Read the text diff below the visual view for a precise list of added and removed lines, then click Compare All Pages for a full-document summary table.
Understanding the Two Views
The visual view renders each page to an image with pdf.js and stacks the two renders. The top layer is clipped at the divider, so the left side shows PDF A and the right side shows PDF B. This is the fastest way to catch moved paragraphs, resized images, changed logos, and altered formatting. The text view extracts the text layer of each page and runs a line-based diff: added lines appear on a green background, removed lines on a red background, with two lines of context around each change so you can see where it happened. Use the visual view for layout and the text view for wording.
What Comparison Can and Cannot Catch
The tool compares pages pairwise, so if a paragraph was inserted on page 2 of the revision, every later page may show as changed because the content shifted. That is normal for page-based comparison and is why the summary table matters: it shows you where the changes start. Scanned PDFs compare fine visually but have no text layer, so their text diff will be empty; run them through OCR first if you need text comparison. Password-protected files cannot be opened, and documents with different page sizes are scaled to fit, which can make identical content look slightly offset.
Tips for a Clean Comparison
For the most meaningful results, compare files that came from the same source: two exports of the same report, or a contract and its redline. Comparing a Word export against a scanned printout will flag everything, because the text layers are completely different. When the summary table shows a long run of changed pages starting somewhere in the middle, the real edit is usually on the first changed page, and the rest is shifted content. Click View on that row to inspect it directly.
Frequently Asked Questions
How does the visual comparison work?
Both PDFs are rendered to images in your browser with pdf.js, then stacked on top of each other. A draggable divider reveals the first PDF on the left and the second PDF on the right, so you can sweep across the page and spot layout, image, and formatting changes instantly. This catches differences that a text-only diff would miss, like a moved logo, a changed font size, or a shifted table. Use the page controls to step through the whole document.
What does the text diff show?
For the selected page, the tool extracts the text of both PDFs and runs a line-by-line comparison. Lines that only exist in the second PDF are marked as added, lines missing from it are marked as removed, and the summary shows the counts for each. The Compare All Pages button runs this across the entire document and produces a table showing which pages changed and by how much, so you can jump straight to the pages that matter instead of reading everything.
Will this work on scanned PDFs?
The visual slider works on any PDF, including scans, because it compares rendered page images. The text diff, however, needs actual text inside the file. A scanned PDF is just pictures of pages, so its text layer is empty and the diff will report no text on both sides even if the pages look different. For scanned documents, run them through the OCR PDF tool first to add a text layer, then compare the results.
Are my documents uploaded to a server?
Never. Both the rendering and the text comparison happen entirely in your browser using the pdf.js library. Your files are read into local memory and never transmitted anywhere, which makes this safe for contracts, legal drafts, financial statements, and other confidential documents. You can disconnect from the internet after the page loads and the comparison will still work.
What if the two PDFs have different page counts or page sizes?
The tool compares pages pairwise: page 1 with page 1, page 2 with page 2, up to the shorter of the two documents. If one PDF is longer, the summary table tells you how many extra pages it has, and you can inspect those manually. Pages with different sizes are scaled to fit the same view, so the visual slider still works, though the scaling itself can make identical content look slightly offset. For best results, compare documents with the same page size.
Why does the text diff show changes I cannot see?
Text extraction reads the invisible text layer of the PDF, which does not always match what you see. Common causes are changed metadata inside the text, like a different creation date in a footer, reordered text objects that render identically, or hyphenation and spacing differences from a different PDF generator. If the visual slider shows no visible change but the diff flags lines, open those lines in the diff view: they usually reveal hidden text like timestamps, revision tags, or white-on-white text.