Handitab

Diff Checker

Compare two texts line by line and see which lines were added or removed, with options to ignore edge whitespace and letter case.

About Diff Checker

A diff checker is a tool that compares two versions of a text and marks what changed. This one compares line by line using a longest common subsequence (LCS) algorithm: lines only in the original are marked with a minus, lines only in the new text with a plus. Options ignore edge whitespace and letter case. It does not highlight changes within a line, and the inputs are limited to roughly 2,000 lines per side.

Also known as: Text Compare, Text Diff, Online Diff Checker, Code Diff, Diff/Compare Files.

How to use Diff Checker

  1. Type or paste into the "Original text" box and the "Changed text" box, or press "Use example" to try it with sample data.
  2. Set "Ignore whitespace at line edges" and "Ignore letter case" if the defaults do not fit.
  3. The result appears below and updates as you type.
  4. Copy the result with the copy button, or download it as a file where that is offered.

Questions about Diff Checker

Why is a whole line marked as changed when I edited one word?

The comparison works on full lines. Any difference inside a line makes it count as one removed line and one added line. Character-level highlighting within a line is not available.

How does the JSON comparison ignore key order?

Both inputs are parsed, object keys are sorted alphabetically at every level, and the result is re-indented with two spaces before the line comparison. Array order is kept, because order is significant in JSON arrays.

Runs in your browser. Page last updated .

More text tools

All 56 text tools