Skip to content

Development

Diff Checker

Compare two texts and inspect added, removed and unchanged lines.

Loading tool…

About this tool

What is Diff Checker?

Compare two text versions before accepting an edit, replacing a configuration or investigating a changed export. Put the earlier version and the intended replacement on consistent sides. The comparison shows textual differences; it does not decide which version is correct or whether a change preserves the behavior of a program.

A worked example

Find a replaced line without treating the whole file as new

Example input

alpha
beta

→

alpha
gamma

Expected result

- beta
+ gamma

Put alpha followed by beta in the original input and alpha followed by gamma in the changed input. Alpha remains unchanged, while beta is removed and gamma is added. The minus and plus signs summarize the change; review the surrounding text as well. A small textual difference can still have a large effect in a rule, path or configuration value.

Common mistakes and limits

  • Line endings, whitespace and formatting can create differences that obscure an actual edit. Normalize only when doing so matches the comparison you intend.
  • The tool does not apply a patch, merge conflicting versions or validate generated code. Keep a recoverable original before replacing a real file.

Features

What you can do

  • Compare two texts line by line.
  • Highlight added, removed and unchanged content.
  • Switch between unified and side-by-side views.
  • Display comparison statistics.
  • Copy a plain-text unified diff.
  • Process both documents locally in your browser.

Frequently asked questions

Questions about Diff Checker

How does this diff checker compare text?

It compares complete lines and uses a longest common subsequence algorithm to identify unchanged, added and removed lines.

Does it compare individual words?

Not yet. This version performs line-level comparison. Word-level highlighting can be added in a future iteration.

Can I compare source code?

Yes. You can compare source code, JSON, SQL, configuration files, logs or any other plain-text content.

Are the compared documents uploaded?

No. Both texts are compared entirely inside your browser.

Related tools