Developer tool · no upload

Text Diff & Code Compare

Paste two versions of text, JSON, Markdown, or source code. Compare line changes instantly inside your browser.

Original

Changed

Summary

Added0
Removed0
Unchanged0

This is a line-based local diff. It is designed for quick review, not legal or cryptographic verification.

Copy-ready patch summary

Diff output

How to use the Text Diff & Code Compare

  1. Paste the older version into Original and the newer version into Changed.
  2. The comparison refreshes a moment after you stop typing, or click "Compare now".
  3. Read the Diff output: lines starting with + were added, lines with - were removed, and the Added, Removed and Unchanged counters total them up.
  4. Click "Copy summary" for a short text with the three counts, or "Clear" to empty both sides.

What it's useful for

  • Checking what changed between two versions of a config file before deploying it.
  • Reviewing edits to an article, policy or contract draft someone sent back.
  • Comparing API responses from two environments after formatting both with the same JSON formatter.

Good to know

  • The diff is line-based and uses a longest-common-subsequence match. A line changed by one character shows as one removed line plus one added line; there is no word-level highlighting.
  • Spaces and letter case count, so trailing whitespace or a changed indent marks a line as different.
  • The algorithm builds a table of size original lines × changed lines, so inputs with many thousands of lines can be slow.
  • Both texts stay in the browser; the comparison runs in the page script.

FAQ

Why does a reformatted file show every line as changed?

Indentation and line breaks are part of each line. Format both versions the same way first, then compare.

Does the copied summary include the changed lines?

No, only the counts. Copy lines from the Diff output if you need them.