Text & Code Diff Checker

Compare two texts or code snippets line by line and highlight what was added or removed.

Why use this tool?

Compare two versions of a text or code snippet and see exactly which lines were added or removed - for contracts, essays, config files or code reviews.

How to use it

  1. Paste the original on the left.
  2. Paste the changed version on the right.
  3. Review the highlighted additions and removals.

How the comparison works

The diff compares the two texts line by line and finds the longest sequence of lines they share, the same approach used by version-control tools like Git. Lines that only exist in the original are marked as removed, lines only in the new version are marked as added, and everything else is shown as unchanged. A summary shows how many lines were added and removed.

Because the unit is a line, changing one word in a long line shows that whole line as removed and re-added. For prose, putting each sentence on its own line before comparing gives a more precise result.

Good uses

Comparing two versions of a contract or policy to see exactly what the other side changed; checking an edited essay against the original; reviewing changes to a configuration file before deploying it; or spotting the difference between two code snippets or API responses that should be identical.

For JSON, format both versions with the JSON Formatter first, so each key is on its own line and the diff shows the changed values clearly instead of one long changed line.

Pitfalls

Invisible differences show up as changed lines: trailing spaces, tabs versus spaces, and Windows (CRLF) versus Unix (LF) line endings. If two lines look identical but are marked as changed, whitespace is the usual cause.

The comparison is exact and case-sensitive, so "Total" and "total" differ. Both texts stay in your browser; nothing is uploaded, which makes it safe for confidential documents.

Frequently asked questions

Why is a whole line marked as changed when I edited one word?

The diff works line by line. Splitting long paragraphs into one sentence per line makes changes easier to pin down.

Two lines look the same but are marked different. Why?

Usually invisible whitespace: trailing spaces, tabs, or different line endings.

Is my text uploaded?

No. Both texts are compared in your browser.