Diff Checker

Paste or open an original and a changed version to see exactly what was added, removed and changed, line by line or word by word.

Compare
Lines added
2
Removed
1
Unchanged
2
Removed: The quick brown fox
Added: The quick red fox
jumps over
the lazy dog.
Added: The end.

Compared in your browser; nothing is uploaded.

How to read the result

  • Green (+) lines were added in the changed version; red (−) lines were removed. A changed line shows as the old line in red and the new one in green, with the words that changed highlighted more strongly.
  • The two numbers on the left are the line numbers in the original and in the changed text.
  • Tick Show only changes to fold long unchanged stretches, keeping three lines around each change.

Example

Comparing “The quick brown fox / jumps over / the lazy dog.” with “The quick red fox / jumps over / the lazy dog. / The end.” line by line gives 2 lines added, 1 removed and 2 unchanged: line 1 changed (brown → red, the only word marked) and line 4, “The end.”, is new.

Good uses

  • Check what changed between two drafts of a contract, essay or policy.
  • Compare configuration files, CSV exports or code snippets without installing anything.
  • Spot edits someone made to a message before you approve it.

Frequently asked questions

How does the diff checker find changes?

It uses the Myers algorithm, the same approach as Git, to find the smallest set of additions and deletions that turns the first text into the second. Inside each changed line it compares word by word, so you see exactly which words changed.

Line or word comparison: which should I use?

Line by line suits code, lists and data, and shows line numbers. Word by word suits prose, contracts and emails, where a single changed word matters.

Can it ignore spaces or capital letters?

Yes. Tick Ignore spaces to treat extra spaces, tabs and spaces at the start or end of a line as the same, and Ignore case to treat Hello and hello as the same. The result still shows your original text.

Can I compare two files?

Yes. Use Open original file and Open changed file for text files such as .txt, .csv, .json, .md or code, up to 5 MB each, or paste the text in. Word and PDF files need to be copied as text first.

How long can the texts be?

Up to about 20,000 lines each. If more than 3,000 lines or words differ, the tool asks you to compare smaller parts, because the result would be too long to read anyway.

Is my text private?

Yes. The comparison runs in your browser and nothing is sent anywhere, so you can compare contracts or code safely.

More text and developer tools

See all text and developer tools →

Can't find the tool you need? Tell us.