> For the complete documentation index, see [llms.txt](https://docs.courtaid.ai/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.courtaid.ai/matter-workspaces/document-comparison.md).

# Document comparison

Compare two versions of a document side by side. Upload version 1 and version 2, see every **added**, **deleted**, and **replaced** passage highlighted, then **chat about the changes** to understand what they mean.

## When to use Compare

* **Contract redlines** — see what changed between draft versions
* **Lease amendments** — identify new clauses and deleted terms
* **Affidavit revisions** — spot factual changes between filings
* **Legislation or policy updates** — compare an old and new version you've exported as PDF
* **Any two document versions** — upload the before and after files

{% hint style="info" %}
Compare works on **two uploaded files**, not on built-in legislation version history from CourtAid's database. Export both versions as PDF or Word and upload them here.
{% endhint %}

## Step 1 — Upload version 1 and version 2

1. Click **Compare** in the sidebar (sign-in required)
2. Upload your two files:
   * **Original Document** — version 1 (the earlier version)
   * **Revised Document** — version 2 (the later version)
3. Click **Compare Documents**

![Compare upload screen with Original and Revised document drop zones](/files/hUdy1qrWaHy2vZVLAi7d)

Drag and drop or click **Choose file** for each side. Supported formats: **PDF**, **Word** (`.doc`, `.docx`). Maximum file size depends on your plan (typically 10 MB on trial).

***

## Step 2 — Review highlighted changes

CourtAid diffs both documents and opens a side-by-side comparison view.

![Comparison results with highlighted changes, changes list, and chat panel](/files/iZQozxgMNmVjQgzPczda)

### Summary statistics

At the top of the comparison, badges show:

| Badge          | Meaning                                            |
| -------------- | -------------------------------------------------- |
| **X% similar** | How much of the text is unchanged between versions |
| **+N added**   | Lines or blocks of new content in version 2        |
| **-N removed** | Lines or blocks deleted from version 1             |

### PDF View vs Text View

Toggle between **PDF View** and **Text View** at the top right:

* **PDF View** — both documents rendered as PDFs with inline colour highlighting (default)
* **Text View** — a text-based diff for quick scanning

### Colour highlighting

In the side-by-side panels:

| Change type  | Original (left)                     | Revised (right)                   |
| ------------ | ----------------------------------- | --------------------------------- |
| **Added**    | —                                   | New text highlighted in **green** |
| **Deleted**  | Removed text highlighted in **red** | —                                 |
| **Replaced** | Old text in **red**                 | New text in **green**             |

Hover over a highlighted passage to see a tooltip — **Added**, **Deleted**, or **Replaced**.

### Changes list

The right-hand panel lists every change, numbered and labelled:

| Label        | Meaning                                                                                      |
| ------------ | -------------------------------------------------------------------------------------------- |
| **ADDED**    | New text that appears only in version 2                                                      |
| **DELETED**  | Text removed from version 1                                                                  |
| **REPLACED** | Text changed between versions — shows the old text struck through and the new text alongside |

Click any change in the list to jump to that passage in both PDF viewers. The list shows line counts (e.g. `-38 | +46`) so you can gauge the size of each change.

***

## Step 3 — Chat about the changes

Use the chat panel at the bottom right to ask questions about what the changes mean. CourtAid reads both documents and the full diff, then explains the legal significance in plain English.

Example questions:

```
What are the most significant changes between these two versions?
Summarise what changed in the indemnity clause.
Does version 2 expand the landlord's termination rights?
Explain change #231 — what does the replacement mean in practice?
Which changes would matter most for a tenant?
```

CourtAid also generates an initial **AI Legal Analysis** when the comparison finishes — a starting summary of the key differences before you ask follow-up questions.

{% hint style="warning" %}
Responses include **"This is not legal advice"**. Use the chat to orient yourself quickly, then verify important changes against both source documents.
{% endhint %}

You can export individual chat responses as **PDF** or **Word**.

***

## Saved comparisons

Past comparisons are listed on the Compare page. Click any saved comparison to reopen the diff, PDFs, changes list, and chat history.

## What Compare does not do

* **Pull legislation versions from the database** — upload both files yourself
* **Three-way merge** — only two documents at a time
* **Replace your review** — AI commentary is a starting point, not a final legal opinion

## Tips

* Name your files clearly before uploading — filenames appear in the comparison header
* Work through the **Changes list** top to bottom for a systematic review
* Click into the largest **REPLACED** items first — they usually carry the most legal weight
* Ask the chat about specific clauses — *"Explain changes to clause 12"* beats *"What changed?"*
* For court filings, cross-check every change against both PDFs before relying on the AI summary

## Related

* [Navigate the workspace](/getting-started/navigating-the-workspace.md) — find Compare in the sidebar
* [Chat PDF](/chat-and-documents/chat-pdf.md) — deep-dive on a single document
* [Projects](/matter-workspaces/projects.md) — store both versions in a project for context
* [Research assistance, not legal advice](/getting-started/legal-disclaimer.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://docs.courtaid.ai/matter-workspaces/document-comparison.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
