Text Diff

Paste original and modified text to see a line-by-line unified diff. One panel may be left empty to treat all lines as added or removed. Combined input limit is 500 KB.

  • Runs entirely in your browser
  • No data stored or sent to a server
  • Free forever — no signup
  • Instant conversion

Input and Output

Use the interactive encoder and decoder on this page to process your text.

Learn more about text diffs

How to Compare Text with a Unified Diff

Text Diff

When to Use Text Diff

Compare config snippets, log excerpts, API responses, or any two text blocks to see exactly which lines were added or removed — without installing a desktop diff tool. Paste original text in the first panel and modified text in the second.

Reading the Output

  • Lines prefixed with - were removed from the original.
  • Lines prefixed with + were added in the modified version.
  • Unchanged lines appear without a prefix.

Common Mistakes

  • Trailing whitespace causing false line differences
  • Expecting word-level highlighting — this is a line-level diff
  • Different line endings (CRLF vs LF, or classic Mac CR) showing entire file as changed — normalize first if needed

Developer Tips

  • Normalize whitespace before diffing if formatting noise is not important
  • Use JSON Diff for structured API response comparison
  • Copy unified diff output into code review comments

Frequently asked questions

Is this a word-level or line-level diff?

Line-level. Each line is compared as a whole unit, which works well for configs, code, and logs.

Is my text sent to a server?

No. The diff runs entirely in your browser.