Text Compare — Side-by-Side Diff Tool

Paste two text blocks to instantly compare them online. This free text diff tool uses an LCS algorithm to highlight added, removed, and unchanged lines in a side-by-side or unified view — no signup required. Works equally well on JSON data responses, Markdown drafts, and contract text.

Original (A) — removed
Modified (B) — added

How to Use the Text Compare Tool

  1. Paste your original text into the left box (Text A) and your modified text into the right box (Text B).
  2. Optionally enable Ignore whitespace to treat lines differing only in leading or trailing spaces as identical, or Case insensitive to ignore capitalisation.
  3. Click Compare. Diff stats showing additions, deletions, and unchanged lines appear immediately.
  4. Use the Side by Side tab to see original and modified in parallel — red lines are removed, green lines are added.
  5. Switch to the Unified tab for a standard +/- diff format, then copy or download it as a .diff file.

Key Features

  • LCS (Longest Common Subsequence) algorithm — the same approach as git diff
  • Side-by-side and unified diff views with colour-coded additions and deletions
  • Ignore whitespace option for reformatted or re-indented text
  • Case-insensitive comparison mode
  • Diff stats: addition count, deletion count, and unchanged line count
  • Copy unified diff to clipboard or download as a .diff file
  • Fully browser-based — neither text ever leaves your device

Use Cases

Compare two versions of a document online

Paste a draft and its revision to see every editorial change at once. The side-by-side view makes it easy to review additions and deletions without reading both versions in full, saving time on long documents.

Find differences between two contract versions

Legal documents often go through multiple rounds of revision. Pasting both versions into this text difference checker instantly highlights every clause that was added, removed, or left unchanged — without reading line by line.

Code review without an IDE

Paste two code snippets to see structural differences side by side. The Ignore whitespace option is particularly useful when comparing code that has been re-indented or reformatted between versions.

Check for plagiarism by comparing submitted text to an original

Paste the submitted piece and the original source into the two panels. Unchanged lines reveal copied passages. Additions and deletions show where content was modified or paraphrased.

Reconcile two CSV or data exports

Compare two exports of the same dataset to find rows that were added, removed, or changed. The unified diff output can be saved as a .diff file for documentation or handoff to a developer. To convert CSV to a structured format before comparing, that converter handles the transformation.

FAQ's

It uses the Longest Common Subsequence (LCS) dynamic programming algorithm — the same approach as git diff and most professional diff tools. LCS finds the minimum number of insertions and deletions needed to transform Text A into Text B.

No. The entire comparison runs in your browser using JavaScript. Neither Text A nor Text B ever leaves your device, making the tool safe for sensitive content such as contracts, internal documents, or proprietary code.

When enabled, each line is trimmed of leading and trailing spaces before comparison. Lines that differ only in indentation are treated as identical. This is useful when comparing code that has been re-indented or text that has been reformatted.

The LCS algorithm has O(m×n) time and memory complexity where m and n are the number of lines. For typical use cases — blog posts, contracts, code snippets — the comparison runs instantly. Very large documents with thousands of lines each may take a few seconds.

Yes. Click Download .diff to save the unified diff as a .diff file. This can be opened in any text editor or applied programmatically using the standard patch command on Linux and macOS.

Unified diff prefixes added lines with + and removed lines with -. Unchanged context lines have no prefix. This format is used by git diff, patch, and most code review tools. It is universally understood by version-control systems.

The comparison is line-by-line. Each line in Text A is compared against lines in Text B to find the minimum set of changes. Within a changed line, the entire line is marked as added or removed rather than highlighting individual word differences.