Web Toolkit

Text Diff Checker

Compare two blocks of text and highlight every addition and deletion.

Compare

Original1 lines
Changed1 lines

Private by design. Everything runs locally in your browser. Your input is never uploaded, logged or stored on a server.

How to use the Text Diff Checker

  1. Paste the original into the left panel and the new version into the right.
  2. Choose the granularity: by line for code and config, by word for prose.
  3. Turn on ignore case or ignore whitespace to filter out changes you do not care about.
  4. Read the added, removed and unchanged counts, then scan the highlighted differences.

A worked example

Input
timeout: 30  →  timeout: 60
Output
1 line removed · 1 line added

By line, a one-character change is a whole line replaced. Switching to by-word narrows it to the two numbers, which is why granularity is the first control to reach for.

Frequently asked questions

What does this diff checker do?

It compares two blocks of text and marks what was added, removed or left unchanged, using the same longest-common-subsequence approach as version-control diffs.

When should I use word mode instead of line mode?

Use word mode for prose, where a small edit inside a paragraph would otherwise show as a whole changed line. Use line mode for code and config files.

Can I compare two files?

Paste the contents of each into the two panels. Nothing is uploaded either way, so it works for private documents.

Why are two visually identical lines marked as different?

Usually trailing whitespace or a different line ending. Turn on "ignore whitespace" to confirm.

About the Text Diff Checker

Two modes cover different questions. Line mode answers "which lines changed" and is right for code, configuration and logs. Word mode answers "what changed inside this paragraph" and is right for prose, where a line diff would mark an entire rewrapped paragraph as changed.

Ignore-whitespace helps when a file has been reindented or had its line endings converted between CRLF and LF, changes that are real but usually not what you are looking for. Ignore-case helps when comparing output from systems that normalise differently.

The summary counts added, removed and unchanged lines so you can judge the size of a change before reading it.

What it does not do

  • Two-way comparison only. There is no three-way merge and no conflict resolution.
  • It shows differences; it does not produce a patch file you can apply.
  • Very large inputs are limited by browser memory, and by-word granularity costs more than by-line.

Further reading

Related tools