# Text diff

Compare two texts and see what changed

Use it at https://www.quicktoolz.com/tools/text-diff. From QuickToolz.

Paste an original text and a changed one to see the differences, line by line. Added lines are marked with a plus, and removed lines with a minus, so you don’t have to rely on colour. If the two texts match exactly, we say so. Everything runs in your browser, so private drafts stay private.

## How it works

Find the longest run of matching lines. Anything else was added or removed.

We find the longest set of lines the two texts share. Anything left over was added or removed. Windows and Unix line endings count as the same.

Worked example: Comparing “a, b, c” with “a, x, c” shows that line b was removed and line x was added. Lines a and c stay the same.

## Examples

| Original | Changed | Result |
| --- | --- | --- |
| a b c | a x c | 1 added, 1 removed |
| a b | a b | Identical |

## What this tool doesn't cover

- This compares whole lines, so a one-word change shows the whole line.
- Very different long texts may need to be compared in pieces.

## Questions

### Is this like Git diff?

It’s the same idea: lines marked as added or removed.

### Does it ignore line ending differences?

Yes. Windows and Unix line endings are treated as the same.

### Is my text uploaded?

No. Everything happens in your browser, and your text isn’t saved or sent anywhere.

### How do I compare two pieces of text?

Paste one on each side. Added text and removed text are marked, so you can see every change at once.

### Can I compare two versions of a contract?

Yes, once you paste the text in. Your text stays in your browser, so it’s fine for private drafts.

## Sources

- [GNU diffutils manual](https://www.gnu.org/software/diffutils/manual/)