Compare PDFs

Compare two PDF files side by side and find the differences, with every changed word marked.

Your files stay on this device. Nothing is uploaded. How to check

Advertisement

How to use Compare PDFs

1. Drop the original and the changed version together (up to 150 MB each), or pick one with Choose Files and add the other with Choose PDF in the empty slot. The first file goes into Original; the swap button between the two slots exchanges them.
2. Under Comparison options, choose whether to ignore capitals or punctuation and whether to match inserted or deleted pages by their content, then click Compare PDFs.
3. Read the result in Side by side, where removed words are boxed in red on the original and added words in green on the changed version, or in Text changes. Tick Mark pixel differences to check images and layout, and click Download report (.txt) to keep a record.

Key features of Compare PDFs

👀 Pages side by side

Each page of the original is drawn next to its partner in the changed version. Removed words are boxed in red on the left and added words in green on the right, at their real place on the page. On a phone the two pages are stacked.

🔍 Word-level differences

Each pair of pages is compared with a Myers diff over its words, which finds the smallest set of added and removed words. A page with more than 2,500 added and removed words is marked as rewritten, with every word boxed and no word list.

âš™ī¸ Comparison options

Ignore capitals is on by default, so Total and total count as the same word. You can also ignore punctuation, and pair pages by their content so that one inserted or deleted page does not make every later page differ.

đŸ–ŧī¸ Pixel differences

Tick Mark pixel differences and each pair of pages is compared pixel by pixel. Areas that differ are tinted purple on the changed version, which catches a replaced logo, a moved image or a changed table border that the word list cannot see.

📋 Text changes and a report

Text changes lists the removed words struck through and the added words highlighted, page by page. Only pages with changes hides the rest, and Download report (.txt) saves the list as a text file.

🔒 Nothing leaves your device

Both files are read, drawn and compared by JavaScript in your browser. Nothing is sent to a server, which matters when the files are contracts or unreleased drafts.

About Compare PDFs

Compare PDFs shows two versions of a document page by page. Removed words are marked on the original, added words on the changed version, and a summary counts the pages that differ, the words added and removed, and any page found in only one file.

The word comparison works on the text layer, so it suits PDFs exported from Word, a browser or a design program, and scans once they have been through OCR. Images, logos, colours and layout are checked only when you tick Mark pixel differences. The result is shown on the page; no PDF is produced.

When to use Compare PDFs

A supplier sends updated terms and conditions and says only the dates have changed. Put the version you accepted in Original and the new one in Changed version, tick Only pages with changes, and look at what is left: if the red and green boxes sit on the dates alone, that is all that changed.

A contract comes back with a schedule inserted in the middle, so every later page would look different if pages were paired by number. Tick Match inserted or deleted pages by their content: the new pages are listed on their own and the rest line up with their originals.

A print-ready brochure was re-exported after a typo fix. The word comparison confirms that one word changed on one page; Mark pixel differences then shows whether a logo or an image moved.

For some jobs another tool fits better. To read or copy the text of a single file, use PDF to Text. Scans need a text layer from OCR PDF before their words can be compared.

Tips and troubleshooting

  • If you drop only one file, the Changed version slot stays empty; click Choose PDF in that slot to add the second. Clicking Compare PDFs with an empty slot shows "Choose two PDF files: the original and the changed version." If more than two files are dropped, only the first two are used.
  • Colours the wrong way round? Click Change options or files, press the swap button and compare again; the files are not read a second time.
  • A header or footer that carries the date, a version string or a page number shows as a change on every page. Only pages with changes will then list them all; the boxes show that the change is the same small one.
  • Text is compared in the order it is stored in the file, which for a two-column layout or a table may not be the reading order. Two files exported by different programs can show words as moved even when they are the same.
  • Mark pixel differences tints everything that moved, so after an inserted word the rest of the line is tinted too. Pages of different sizes are scaled to the same size first, so a page that was only resized shows as changed all over.
  • A password-protected file stops the run with "Comparison failed" and a password error; remove the password first with Unlock PDF. There is no PDF output: the result is the page itself plus comparison-report.txt.
  • Contracts and drafts are often confidential. The guide are online PDF tools safe? explains what happens to files on a server-based service and how to check where any site sends them.

How Compare PDFs works in your browser

Each file is opened by pdf.js, which parses it in a Web Worker. For every page the tool reads the text items and their positions, splits them into words, and works out each word's box on the page from the item's transform and the width of the text before it. Chinese and Japanese characters count as one word each. Words are normalised (Unicode NFKC, then lower case and without punctuation if you chose those options) and each pair of pages is compared with Myers' diff algorithm, which returns the smallest list of words to remove and add.

Pages are paired by number, or with the matching option by an alignment that scores every pair of pages by the share of words they have in common, so an inserted page costs one gap instead of shifting every later page. In Side by side each page is drawn to a canvas as it scrolls near the screen, and the boxes of the changed words are painted over it. With pixel marking on, every pair of pages is also compared in the background: the original page is scaled to the size of the changed one and pixels whose colour differs by more than a small threshold are counted, and tinted on the pages you see.

Frequently asked questions

Does it compare images and formatting?

Only when you tick Mark pixel differences. The two pages are then drawn at the same size and compared pixel by pixel, and areas that differ are tinted purple on the changed version. That shows changed images, fonts, colours and layout; the word counts and the report cover text only.

What if the two files have different numbers of pages?

By default pages are paired by number, and a page that exists in only one file is shown on its own. If a page was inserted or deleted in the middle, tick Match inserted or deleted pages by their content: pages are then paired by the words they share, so the pages after the change still line up.

Can it compare scanned PDFs?

A plain scan has no text layer, so there are no words to compare, and the result says so rather than calling the text identical. Mark pixel differences still shows where the page images differ, provided the two scans line up. For a word comparison, run both files through OCR PDF first.

Which file counts as the original?

The first file you drop or select goes into the Original slot and the second into Changed version. Words only in the original are boxed in red, words only in the changed version in green. The swap button between the slots exchanges the two before you compare.

Why does every page show changes when only one line was edited?

Usually because a header or footer carries a date, version or page number that changed on every page, or because the two files were exported by different programs and store their text in a different order. The boxes on each page show how small the change is.

Is the comparison case-sensitive?

Not by default. Ignore capitals is ticked, so Total and total count as the same word; untick it to report a changed capital letter. Punctuation counts unless you tick Ignore punctuation, which removes commas, full stops, quotes, brackets and other punctuation marks before comparing.

Last reviewed