Skip to content
SPCXTools

Diff Checker

Paste two versions of a text and instantly see what was added, removed or changed.

Runs locally — files never leave your device

Loading tool…

How to use Diff Checker

  1. 1Paste the earlier version into Original and the newer version into Changed.
  2. 2Choose how to compare — by Lines for code and lists, Words for prose, or Characters for small edits.
  3. 3Read the result — additions are green, deletions are red, and the summary counts both.
  4. 4Optionally ignore differences in letter case, or in whitespace when comparing lines. Use Swap to reverse the direction.

Compare two texts side by side

When a document goes through several drafts, it is hard to see what actually changed. This diff checker compares two versions and highlights every difference: green for text that was added, red for text that was removed. Choose to compare by line, word or character, and optionally ignore case or whitespace. The comparison runs entirely in your browser, so you can safely check contracts, code and confidential documents.

Features

  • Three levels of detail: lines (with line numbers for both versions), words, and individual characters.
  • Ignore case and ignore whitespace options to hide differences that don't matter.
  • Summary counts of additions and deletions, plus a clear message when the texts are identical.
  • Swap button to reverse which text is treated as the original.
  • No size limits or uploads: long documents are compared locally.

What people compare

Contracts and policies. Check exactly what the other side changed in a revised agreement before you sign it. Word mode highlights changed terms inside long clauses.

Code and configuration. Compare two versions of a function, a .env file or a server config without setting up version control. Line mode with line numbers reads like a familiar code-review diff.

Writing and editing. See the edits an editor or a grammar tool made to your article, or compare a translation with its revised version.

Data and lists. Paste two exports to find rows that were added or removed. For JSON data, format both sides first with the JSON Formatter (with sorted keys) so the comparison focuses on real differences.

How diffing works

A diff algorithm looks for the longest common subsequence — the largest amount of text both versions share in the same order — and reports everything else as insertions or deletions. This tool uses the Myers algorithm, the same family of algorithms used by Git and most code review tools. Because it searches for the smallest edit, a moved paragraph appears as one deletion and one insertion rather than as a "move".

If you only want to remove repeated entries from a list, use Remove Duplicate Lines instead.

Frequently asked questions

Is my text uploaded to compare it?
No. The comparison runs in your browser using a JavaScript diff algorithm, so contracts, source code and private documents stay on your device.
Which comparison mode should I use?
Use Lines for source code, configuration files, CSV data and lists — it shows numbered lines like a code review. Use Words for articles, essays and legal text, where a changed word inside a long paragraph matters. Use Characters to spot typos, punctuation changes and small edits within words.
What does ignoring whitespace do?
In line mode, it treats lines as equal when they differ only in spaces or tabs, such as changed indentation. This is helpful when comparing code that was reformatted.
How are the differences calculated?
The tool uses the Myers diff algorithm (the same approach used by Git), which finds the smallest set of insertions and deletions that turns the original into the changed text.
Can I compare files?
Open the files in any text editor, copy their contents and paste them into the two boxes. Any plain-text format works, including code, JSON, CSV, Markdown and HTML.
Why does a whole paragraph show as changed in line mode?
In line mode an entire line is the unit of comparison, and a paragraph is often one long line. Switch to Words to see exactly which words changed inside it.