Text Diff

Compare two texts in the browser. Changed lines and characters are marked, then you can copy a Unified Diff.

A · Original text

B · New text

What this page does

Two versions of a text can be compared in the browser. This page marks added, removed and changed lines, highlights the characters that moved inside a changed line, and can copy a Unified Diff. Comparing JSON structure stays on JSON Diff.

How to use it

  1. Paste Original text in A and New text in B, or Load file on either side. Compare runs once. Show Example fills A with # app.conf, name = shop, host = example.com, port = 8080, debug = false, log = info and timeout = 30. B keeps the first three lines, sets port = 443 and debug = true, drops log = info, keeps timeout = 30, and adds retries = 3.
  2. Compare finished shows Modified 2, Added 1, Deleted 1, Unchanged 4. port = 8080 / port = 443 and debug = false / debug = true are modified lines. Copy Result and Copy Unified Diff both copy --- A, +++ B, @@ -1,7 +1,7 @@, then -port = 8080, +port = 443, -debug = false, +debug = true, -log = info, a space plus timeout = 30, and +retries = 3.
  3. Ignore leading and trailing spaces treats padded copies of the same line as unchanged. Ignore case treats Value and value as the same line. Swap exchanges A and B. Previous and Next jump between changes. Clear marks puts the editors back. Typing after a compare clears the marks.
  4. Clear All empties both sides, turns the two ignore boxes off and removes the marks.

Rules and edges

Each side must stay under 1 MiB and 10,000 lines. Files are read in this browser and are not uploaded. The compare is exact text, not similarity or plagiarism. It does not read Word, PDF or images. Unified Diff is a patch-style text with context lines, not a Git command.

Where people use it

  • Checking a config paste against the last version.
  • Loading two log files and jumping to the next change.
  • Copying a Unified Diff into a review note.

Questions

Why is log deleted instead of paired with retries?

retries sits after timeout, so log has no partner. It is deleted and retries is added.

Does this compare JSON keys?

No. It compares plain text. JSON structure stays on JSON Diff.