DevToolPal
EN

Text Diff Checker

Compare two texts and highlight what was added, removed or changed, line by line, word by word or character by character.

Runs locally, never uploaded

Options

Compare

Original text

Changed text

Differences

Result appears here

What it does

The text diff checker compares two versions of a text and shows exactly what changed. Removed content is marked in red and added content in green, with line numbers from both versions so you can find each change in the original files.

Use it to review edits to a document, compare two config files, check what changed between two API responses, or spot the one character that breaks a string comparison.

How to use

  1. Paste the old version into Original text and the new version into Changed text, or click Sample.
  2. The differences appear below as you type.
  3. Choose Lines, Words or Characters to control how fine-grained the comparison is.
  4. Turn on Ignore case or Ignore leading/trailing spaces to hide changes you do not care about.
  5. Click Swap to reverse the direction, or Copy patch to copy a unified diff.

Example

Comparing a shopping list where bread became whole grain bread, eggs was removed and dark chocolate was added shows two removed lines and two added lines. The unified patch looks like this:

 apples
-bread
+whole grain bread
 milk
-eggs
 coffee beans
+dark chocolate

Tips

  • For JSON, format both sides with the JSON formatter first so that the diff shows real changes rather than layout differences.
  • Very large or completely different texts may take too long to compare; in that case the tool stops after a few seconds and asks you to reduce the input.

FAQ

› What is the difference between line, word and character mode?

Line mode marks whole lines as added or removed and is best for code, config files and lists. Word mode highlights changed words inside a paragraph, which suits prose. Character mode shows the smallest edits, such as a single typo.

› Can I get a patch file?

Yes. Click "Copy patch" to copy the differences in unified diff format, the same format as git diff, which tools like git apply and patch understand.

› Why are lines with only spacing changes shown as different?

By default every character counts. Turn on "Ignore leading/trailing spaces" in line mode to ignore indentation and trailing whitespace.

› Are my texts uploaded?

No. The comparison runs in your browser, so it is safe for private documents and source code.