PDF Compare: Side-by-Side Pages, Text Diff and Review Report

Open Tool PDF Compare Viewer

PDF Compare: Side-by-Side Pages, Text Diff and Review Report

When to use

A contract comes back with the note "minor changes". On page 18 the payment window has moved from 30 days to 60. A table of contents will not show that. A quick visual scan may not either.

This tool opens two PDFs side by side. A is the original on the left, B is the revision on the right. Paging and zoom can stay in sync. The text layer is extracted page by page and compared line by line.

It fits contracts, proposals, papers, policy documents and product manuals. You see which pages changed first, then open the exact page to check the wording. At the end you can export a Markdown report as a review record.

It does not fit scanned documents. A scan has no text layer. Pages still render, but the diff list is empty. It is useful when a reviewer sends only a revised PDF and no change log. The summary gives a quick map of the revision, and the page list lets you jump straight to the pages that need attention. You do not need to install a desktop diff tool or convert both files to text first.

It also does not compare images, stamps, signatures or layout offsets.

Default view: two PDF upload areas and the side-by-side preview

Parameters

Choose one PDF in area A and one in area B. Click or drag and drop. Each file can be up to 50MB. Parsing happens in the browser and the file is not uploaded.

Previous and Next move by the current page number. The page input jumps directly. An out-of-range value is clamped to 1 or the last page. The total page count is the larger of the two documents.

Zoom has four options: fit width, 125%, 150% and 200%. Fit width calculates a scale from the panel width. Enlarged pages can scroll horizontally inside the panel.

Sync scroll copies the scroll position from one panel to the other. It syncs position, not page number. When the page counts differ, the two sides may not line up visually. That is expected.

The summary counts unchanged pages, changed pages, pages only in A and pages only in B. Click a page to see its line diff in the text diff panel.

The diff uses a longest common subsequence. A green plus marks a line added in B. A red minus marks a line removed from A. Unmarked lines exist on both sides. The comparison is line-based, not character-based. This keeps the output readable. A single changed word marks the whole line, which is usually what a reviewer wants to see.

Steps

  1. Choose the original PDF in area A and the revised PDF in area B. You can also drag each file into its area.
  2. Both files load and the tool extracts text automatically, or click Start Compare to run it again.
  3. Read the summary first. Note the number of changed, added and removed pages to judge the size of the revision.
  4. Click page 1 and review page by page. Use Previous and Next, or type a page number.
  5. Turn on Sync Scroll when you need to compare lines across the two panels.
  6. Click Download Compare Report and keep the Markdown file with your review email or ticket.

After comparison: diff filters, page thumbnails and page statistics

What you get

The summary has five numbers: A pages, B pages, changed pages, added pages and removed pages. A changed page exists in both files but its text layer differs. An added page exists only in B. A removed page exists only in A.

Unchanged does not mean visually identical. The text layer can match while images, table borders or header positions move. Version 1.1.0 also computes a visual change rate for the current page, but it is only a pixel signal, not an element locator.

A diff line can be caused by an empty line or an encoding difference. PDF line breaks, spaces and font encodings do not always match Word. If a line looks the same but is marked changed, check for hidden characters.

The preview uses the same rendering engine as the compare pass, so a page that renders on screen is a page that can be reviewed. Text extraction is separate from rendering. A font substitution can change the glyphs on screen while the extracted text remains correct.

The report is Markdown. It contains file names, page counts, the summary and the per-page diff. It does not embed page screenshots and does not produce an annotated PDF. It fits a Git repository, a wiki or a ticket. The file uses plain headings and a compact summary, so a reader can skim the first screen and still find the exact page later.

Large files take longer to parse and render. The 50MB limit is there to keep memory bounded on a laptop. If a file is mostly scanned images, reduce its resolution before comparing.

A password-protected PDF is rejected with a message and never enters the comparison. A scanned PDF can render, but without a text layer the diff list stays empty.

Current-page visual change rate, thumbnail status and changed-page list

FAQ

Why does the tool report changes when the two PDFs look the same?

Spaces, line breaks, font encoding or hidden text can differ. Open the page and read the red and green lines; the exact sentence usually becomes obvious.

Can I compare scanned PDFs?

Pages render, but line-level comparison needs a text layer. Run OCR first and export a searchable PDF, then compare again.

Are the files uploaded?

No. PDFs are parsed by a worker inside the browser, and memory is released when the page closes. The tool does not contact external storage.

Boundaries

The tool does not run OCR, generate a pixel-diff image or recognize stamps or table structure; the current-page visual rate only compares pixels. It does not provide cloud archiving, annotation export or multi-user collaboration. The report is a record of text-layer differences, not a substitute for final legal or business review.

What 1.1.0 adds: thumbnails, visual rate and CSV

The right column now starts with a row of page thumbnails. The thumbnail uses page B, falling back to A when B has no such page; the border colour marks changed, added or removed. At most 60 thumbnails are shown, so a 300-page document does not fill memory. The All, Changed, Added, Removed and Unchanged filters update both the list and the thumbnails, and the page buttons and text diff follow.

When you open a page, the tool renders A and B to 520 pixels wide in the background and compares RGB values, then reports a visual change rate such as 12.4 percent with a pixel count. It only checks the current page, does not create a diff image and cannot tell an image from a stamp or a table rule. A high rate with unchanged text usually means an image, signature or layout block moved; open the preview and confirm.

The report button still writes Markdown, and a CSV button is new. The CSV uses RFC4180 quoting and CRLF line endings, with page, status, removed lines, added lines and visual rate. The visual rate is computed lazily, so open that page before exporting if you need the number; pages you never opened stay blank rather than fake a zero.

Above 300 pages the tool asks you to split the file, so one parse does not exhaust browser memory. The text diff still uses LCS, but trims the common prefix and suffix first; if the middle block exceeds four million cells it falls back to a whole-block delete and add. That fallback makes the diff coarser, but it does not skip pages.

What 1.2.0 adds: normalized comparison, visual threshold and heatmap

Version 1.1.0 compared text with exact character matching, so a case or spacing change counted as a difference. Version 1.2.0 adds Ignore case and Ignore whitespace. Each line is normalized before the LCS pass, which suits English contracts, PDFs exported by layout tools and two exports of the same template. The report and CSV state the comparison mode so an ignored-space result is not mistaken for an exact match.

The visual threshold is now selectable at 12, 36 or 64. Twelve is strict and counts anti-aliasing; 36 suits most documents; 64 is loose and focuses on obvious colour or image changes. The threshold affects pixel statistics only, not the text diff. The rate, pixel count and the CSV visual_pixels column update together.

The new heatmap draws the current page A render as a base, marks pixels above the threshold in red and outlines adjacent changed rows as translucent red bands. Use it to tell whether the change is text, an image or scan noise, and download the PNG for a review record. It rasterizes only the current page, not all 300, so a large document does not exhaust memory.

The CSV now has visual_percent, visual_pixels and compare_mode columns. Pages that were never opened keep an empty visual value instead of a fake zero. Changing the mode reparses both PDFs and returns to page one; wait for the text-layer pass to finish before switching on a large file.

What 1.3.0 adds: word-level differences and a nine-column CSV

A line LCS tells you that two lines differ, but not which words changed. Version 1.3.0 runs a second token-level LCS between adjacent removed and added lines: split on whitespace, align the token sequences, and count only words that are truly removed or added. Punctuation and pure whitespace are excluded so formatting noise does not inflate the numbers.

The result bar shows "word diff -x/+y". Open a changed page and the text-difference area adds word pairs: removed words in the old line are marked red and added words in the new line green. This helps review contract clauses, release notes and translations, but it is not a substitute for legal word-by-word review.

After comparison the viewer jumps to the first changed page, or to the first added/removed page when nothing changed. You no longer need to hunt through thumbnails to see word highlights, while the filter still offers all, changed, added, removed and unchanged.

The CSV grows from seven to nine columns: page, status, removed_lines, added_lines, visual_percent, visual_pixels, word_removed, word_added and compare_mode. Word columns are 0 for unchanged pages and actual token counts for changed pages; the Markdown report also gains a word-difference line.

Word statistics read the PDF text layer only. Scans, text inside images, stamps and signatures have no comparable tokens, so use the visual heatmap and human review. Unopened pages keep an empty visual value rather than a fake zero.

1.4.0: Standalone HTML report

1.4.0 adds “Download HTML report”. It writes summary cards, a per-page table, line-level differences and word pairs into one standalone HTML file. All CSS is inline; no external fonts, scripts or images are referenced. The file opens locally, prints cleanly and can be archived.

The report shows changed, added, removed and unchanged counts, plus columns for page, status, removed/added lines, visual difference and word-level -/+. Each difference page has its own anchor and the table links to it. Word pairs still cover only adjacent removed/added lines, capped at 60 pairs so a long report stays responsive.

The HTML is review material, not a digital signature or legal evidence. It does not embed the source PDFs and does not replace final proofreading; scanned pages still need the heatmap and human review. File names come from local selection, so rename the report according to your project convention.

⏫︎