← All tools
// Text / Compare

Text Diff online

Compare two texts and highlight line-by-line differences

Text Diff Checker logo
by
CHUNKY
MUNSTER
// Original
// Modified

How to Use the Text Diff Checker

  1. Paste or enter your input into the text field.
  2. Configure any options (format, delimiter, encoding, or mode) using the controls above the output.
  3. The result updates instantly — no submit button required for most operations.
  4. Click Copy or Download to take the output to your next step.

Paste the original text on the left and the modified text on the right. The tool splits both inputs on newlines and computes the longest common subsequence — the same diff approach used by git diff and Unix diff(1) — then renders added lines in green, removed lines in red, and unchanged context lines in neutral grey.

How the Text Diff Checker Works

Comparison is exact: trailing whitespace, tab vs space, and case all matter. If you want a fuzzier diff (ignore whitespace, ignore case), normalise both inputs first using the Text Whitespace or Text Case tools. Diffs are computed in O(n×m) time, so very large files (10k+ lines) may take a second or two but will not freeze the browser.

Frequently Asked Questions

Does this diff ignore whitespace differences?

No — comparison is exact, including trailing spaces and tab vs space. Normalise both inputs with the Text Whitespace tool first if you need a whitespace-insensitive comparison.

What algorithm does it use?

It uses an LCS (longest common subsequence) line diff, the same family of algorithms behind diff(1) and git diff. Differences are reported as line additions and deletions, not character-level edits.

Can it compare two binary files or images?

No — it operates on text only. For binary files, use a hash comparison (MD5 or SHA-256) to check if they're identical.

Is there a size limit on the inputs?

There's no hard limit, but the LCS algorithm is O(n×m). Two 10,000-line files compare in roughly a second; 100,000-line files will take noticeably longer.

Explore the full suite of Text tools and 290+ other free utilities at Chunky Munster.