# How to Compare Two Scanned Contracts Line by Line

- Author: Schema Law (https://www.schemalaw.com/)
- Published: 2025-01-10T07:09:33Z
- Updated: 2026-10-11T19:22:20Z
- Category: Contracts and agreements
- Canonical: https://www.schemalaw.com/blog/how-to-compare-two-scanned-contracts

> To compare two scanned contracts, convert both scans to text, tidy them the same way, run a comparison, then test each marked difference against the pages.

To compare two scanned contracts, run OCR on both scans, export each one as plain text or Word, strip out page furniture such as running footers and page numbers, and put the two texts through a comparison tool. Then test every marked difference against the page images, because some of the marks will be recognition mistakes.

The method is short. The judgment sits in the last step, where you decide which marks are changes to the deal and which are artifacts of scanning. The sections below go through preparation, the comparison itself, reading the output, the special case of a signed scan against your own draft, and the record you keep at the end.

## Why can't you compare two scanned contracts directly?

Two scanned contracts cannot be compared directly because each one is a set of page pictures, and a comparison tool works on characters. It lines up words and reports where they differ. A picture of a clause holds no words to line up, so the tool sees two files with nothing in them.

Three workarounds are tempting.

**Reading the two side by side.** It works for a two-page letter agreement. On a forty-page services agreement the eye skips. A changed "thirty" to "sixty" in the middle of a long indemnity paragraph is exactly what a tired reader passes over.

**Flipping between the same page in each file.** If both scans came from the same print run, a changed line seems to jump when you toggle. When the two scans were made on different machines at different angles, everything jumps, and a single inserted sentence pushes every later page out of step.

**Using the text layer the scanner added.** Some copiers attach recognized text on their own. If you can select words in both files you may be able to compare them as they stand, but check the quality first by copying a paragraph into a blank document. A weak text layer buries real changes under hundreds of false ones.

Which case you are in decides the work:

| What you hold | What a comparison needs |
| --- | --- |
| Two image-only scans | OCR on both |
| One scan and one Word or text-based PDF | OCR on the scan only |
| Two scans with scanner text layers | A quality check, then fresh OCR on both if either layer is weak |
| Two text-based PDFs | No OCR; export the text and compare |

If you are unsure whether a file holds text, the selection test in the post on [why you can't copy text from a PDF](https://www.schemalaw.com/blog/why-cant-i-copy-text-from-a-pdf#how-can-you-tell-whether-a-pdf-has-real-text) settles it in a few seconds.

## Converting both scans so a comparison tool can read them

Convert both scans with the same tool and export both in the same format, then tidy the two exports with identical steps. The goal is two files that differ only where the contracts differ. Anything you do to one file and not the other shows up later as a false difference.

### Pick the export

Plain text suits comparison best when the contract is mostly clauses. It carries no fonts, styles or automatic numbering for a comparison tool to trip over. Word suits a contract with pricing tables or a long definitions grid that you want to keep as tables.

In Schema Law you upload each scan and export from the parsed result. The homepage describes the plain text export as the text alone, for quoting and comparison, and the [list of export formats](https://www.schemalaw.com/#formats) shows the others. The free plan takes documents of up to three pages, so a longer agreement needs a paid plan; the [pricing page](https://www.schemalaw.com/pricing) gives the page limits.

### Tidy both files the same way

Work through this list on each export, in this order, and save the result under a new name so the raw export survives.

1. **Name the files for their role.** `A-2021-signed-raw.txt` and `B-2023-renewal-raw.txt` are harder to mix up than two downloads with the scanner's file names.
2. **Cut the page furniture.** Running footers, document reference codes, "Page 7 of 31" and fax banners repeat on every page and land in the middle of sentences that cross a page.
3. **Rejoin what the page split.** Where a sentence ran from the foot of one page to the head of the next, close the gap so it is one paragraph again.
4. **Put one paragraph on one line.** If the export broke lines where the printed lines ended, join them. Two printings of the same clause wrap at different words, and a line-based tool will mark the whole clause.
5. **Undo end-of-line hyphens.** "termin-" and "ation" become "termination".
6. **Standardize the small characters.** Replace curly quotation marks with straight ones, non-breaking spaces with ordinary spaces, and double spaces with single ones, in both files.
7. **Decide what to do with the back of the contract.** Signature pages will differ. Schedules and exhibits can be easier to compare one at a time. Move them to separate files or delete them from the comparison copies, and write down which.

Do not correct recognition errors at this stage, however obvious. If you fix "Sel1er" in one file and miss it in the other, you have made a difference. Leave the text as read and let the comparison surface it.

## Running the comparison in Word or a text comparison tool

Run the comparison in Word when you want a redline lawyers can read, and in a text comparison tool when you want a strict line-by-line listing. Both take two files, an earlier and a later one, and both leave your inputs untouched if you work on copies.

### In Word

Microsoft's instructions for [comparing and merging two versions of a document](https://support.microsoft.com/en-us/office/compare-and-merge-two-versions-of-a-document-f5059749-a797-4db7-a8fb-b3b27eb8b87e) are to open one version, go to the Review tab, select Compare and then Compare Documents, choose the original document and the revised document, and select OK. Revision marks then show the differences. Put the earlier contract in the original slot so insertions read as additions to it.

If your inputs are plain text files, open each in Word and save it as a Word document first. Paste nothing into a template with automatic numbering, because Word will renumber one file and not the other.

### In a text comparison tool

A text comparison tool, often called a diff tool, shows the two files in adjacent panes and highlights lines that differ. Some also highlight the changed words inside a changed line. Put one paragraph on one line in both files before you compare, so that each highlighted line is one clause.

| | Word comparison | Text comparison tool |
| --- | --- | --- |
| Output | A redlined document | Two panes with highlighted lines |
| Good for | Sending to a lawyer or a client | Working through a long list quickly |
| Trips on | Styles, numbering, tables | Paragraphs that wrap differently |
| Moved clauses | May be shown as a deletion and an insertion | May be shown as a deletion and an insertion |

### When the structure has changed

If one version has a new clause 4, every later clause number differs, and cross-references differ with them. The output fills with marks that all trace back to one insertion. Two ways through: compare clause by clause, pairing each clause in A with its counterpart in B by heading; or temporarily strip the clause numbers from both comparison copies and compare the wording alone, then check numbering and cross-references as a separate pass.

Save the comparison output as its own dated file. You will want to show later what the tool reported before anyone began resolving it.

## Which differences are real and which are OCR noise?

A difference is real when the two page images show different words, and noise when the images show the same words and the conversion read one of them wrongly. No property of the mark itself tells you which. You open both pages at the clause and look.

Some patterns let you guess before you look, which helps you order the work:

| Pattern in the output | Usually | Still check? |
| --- | --- | --- |
| A letter swapped for a look-alike digit: `l` and `1`, `O` and `0` | Noise | Yes, if it sits inside a number or a section reference |
| `rn` against `m`, `cl` against `d` | Noise | A glance |
| A missing or extra comma | Either | Yes; a comma can change what a list covers |
| A whole word replaced by another real word | Real | Always |
| A number that differs by one digit | Either | Always, on both images |
| A sentence present in one file only | Real, or a line the conversion skipped | Always |
| The same wrong character all through one file | Noise from a faint or skewed scan | Check a sample, then the numbers |

### A worked example

Calder Freight Ltd and Wren Analytics Inc. are fictional. Their 2021 services agreement and a 2023 "renewal on the same terms" both arrive as scans. After conversion and tidying, the comparison reports nine marks in the first twelve clauses. Checked against the images, they resolve like this:

- Clause 2.1, "Calder Frcight": the 2023 scan has a speck on the "e". Noise.
- Clause 3.2, "thirty (30) days" against "sixty (60) days": both images confirm. Real.
- Clause 3.2, "wntten notice": noise.
- Clause 5.4, `$4,150` against `$4,750`: the 2021 image shows 4,150 and the 2023 image shows 4,750. Real.
- Clause 6.1, `1.5%` against `l.5%`: noise, though it was worth the look.
- Clause 8.3, a sentence on subcontractors present only in 2023: real.
- Clause 9.2, "shall not" against "shall": the 2021 scan has a punch hole through "not", and the word is there on the page. Noise, and the most dangerous mark on the list.
- Clause 11.1, "Agreement" against "Agreernent": noise.
- Clause 12.5, "Ohio" against "Delaware": real.

Four real changes in a renewal described as being on the same terms. That is the finding. The five noise marks cost a few minutes each.

### What the output cannot show

A clean result is weaker than it looks. If both scans share a defect in the same place, the two texts agree and nothing is marked. And anything written by hand may be missing from both texts, or present in one. A struck-out figure with initials beside it changes the contract and may leave no trace in the comparison. The post on [handwritten changes to a contract](https://www.schemalaw.com/blog/handwritten-changes-to-a-contract) explains what happens to those marks and how to find them. Page through both scans for ink before you report that two contracts match.

A real difference often changes the price, the term, or a party name. Quote the changed sentence from both scans and keep each page number with it. Any parol evidence rule question about statements outside the pages is for the lawyer. Show the words as they appear on the two images.

## Comparing a signed scan against the draft you sent for signature

To compare a signed scan against the draft you sent, convert only the scan and compare it with the Word file you already have. One side is exact, so every mark is either a recognition error in the scan or a change made after the draft left you.

This is the cleanest comparison there is, and it is worth doing whenever a counterparty prints, signs and scans instead of signing your file electronically. Printing breaks the link between what you sent and what came back.

Before running anything, compare the shape of the two documents:

- **Page count.** Your draft printed to 22 pages. Does the scan have 22 pages before the signature page?
- **Footer codes.** If your draft carried a document number or version stamp in the footer, it should appear on every scanned page, the signature page included. A signature page with a different stamp was printed from a different version.
- **Attachments.** Count the schedules and exhibits and check their titles against your draft.

Then compare the text. Feed the tool your Word draft as the original and the converted scan as the revised document. Pay the closest attention to the places where a change is easy to make and hard to see: figures, dates, percentages, party names, the notice address, and any blank your draft left to be completed at signing. Completed blanks will show as differences and each one needs recording, since the filled-in value is part of what was signed.

Expect one category of mark that means nothing: your draft's automatic numbering, styles and table of contents will not match the flat text from the scan. Saving a copy of your draft as plain text and comparing text with text removes most of it.

A difference that survives the image check is a fact to report, with both pages attached. Whether it is an innocent reprint from an older file or something else is for the lawyer on the matter to assess. The same check applied to a lease and a later draft is described in the post on [comparing a converted lease to a later draft](https://www.schemalaw.com/blog/commercial-lease-pdf-to-word#comparing-the-converted-lease-to-a-later-draft).

## Recording what changed between two contract versions

Record the result as a change list: one row for each real difference, with the clause, the page in each scan, the words in each version, and who checked the images. The redline shows what a tool reported. The change list shows what a person confirmed.

A layout that works:

| No. | Clause | Page in A | Page in B | Version A reads | Version B reads | Status | Checked by |
| --- | --- | --- | --- | --- | --- | --- | --- |
| 1 | 3.2 | 4 | 4 | thirty (30) days | sixty (60) days | Confirmed on both images | RT, 9 Oct |
| 2 | 5.4 | 7 | 7 | $4,150 | $4,750 | Confirmed on both images | RT, 9 Oct |
| 3 | 8.3 | 10 | 10 | (no such sentence) | Subcontractor sentence added | Confirmed on both images | RT, 9 Oct |
| 4 | 14.2 | 16 | 17 | illegible in scan | "written consent" | Unresolved; better copy of A requested | RT, 9 Oct |

Some rules for keeping it honest:

- **Quote from the image.** Type the entries while looking at the scanned page, so the list is right even where the converted text was wrong.
- **Keep an "unresolved" status.** A mark you could not settle because one scan is unreadable belongs on the list with that label. Dropping it implies the versions agree there.
- **Leave noise off the list but keep a count.** "41 marks reviewed, 6 confirmed, 1 unresolved, 34 recognition errors" tells the reader how thorough the review was.
- **Say what was left out.** If signature pages and exhibits were compared separately or not at all, the list should say so on its face.

File the list with the two scans, the two raw exports, the two tidied copies and the dated comparison output. Together they let someone else repeat the work.

One limit on the method: comparison answers "how do these two full texts differ?" If the second document is an amendment that changes three clauses of the first, there is nothing to line up, and the job is to apply the amendment to the original. That is covered in the post on building a [conformed copy of a contract](https://www.schemalaw.com/blog/conformed-copy-of-a-contract).

This post describes how to handle the documents. What a confirmed change means for the parties is a legal question for the lawyer responsible for the matter.

## Try it on a real document

Upload a scanned PDF and export it as Word, a searchable PDF or plain text on the free plan. Your documents are never used to train an AI model. [Start free](https://www.schemalaw.com/api/auth/google)
