$ SudoStuff

Text Diff

Compare two blocks of text line by line.

Processed locally in your browser. Nothing you type here is sent to our servers.

What does this tool do?

It compares two blocks of text and shows what changed between them — added content on a green background marked +, removed content on red marked −. Each marker carries a text label for screen readers, so the meaning never depends on colour alone.

How to use it

  1. Paste the original text on the left and the changed version on the right.
  2. Press Compare, or ⌘/Ctrl + Enter.
  3. Switch between line and word comparison to suit the kind of text.
  4. Use Changes only to hide everything that stayed the same.

Lines or words?

Line mode is what git diff does: any line that changed at all is shown as one removal plus one addition. It is the right choice for code, configuration and structured data, where a line is a meaningful unit.

Word mode highlights the individual words that changed inside a paragraph. Far better for prose, where a line break is an accident of wrapping rather than a unit of meaning.

The options

  • Ignore whitespace — indentation and trailing-space changes stop counting as differences. Useful after a reformat.
  • Ignore case — treats Hello and hello as the same.
  • Changes only — hides unchanged lines so a small change in a large file is easy to find.

Common use cases

  • Comparing two config files from different environments.
  • Seeing what an editor changed after a reformat.
  • Reviewing edits to a document when you have no version control.
  • Checking whether two log excerpts differ, and where.
  • Comparing an expected against an actual test output.

Limitations

  • This is a textual diff, not a semantic one. Two JSON documents with the same data in a different key order will show as different — use the JSON diff for that.
  • Moved blocks are reported as a removal in one place and an addition in another, since there is no reliable way to distinguish a move from a coincidence.
  • Very large inputs produce very large outputs; the comparison is fast but rendering thousands of rows is not.
  • Line endings are treated as written. Text with CRLF endings compared against LF will differ on every line unless you ignore whitespace.
↑↓ navigate ↵ open esc close