Flex Utils - Free online tools including calculators, image compressor, and AI utilitiesFlex Utils - Free online tools including calculators, image compressor, and AI utilities

Text Comparison Tool

Compare and diff up to 4 text revisions side by side with inline diff highlighting inside each box, an aggregate diff summary, and 90-day local history

text comparison
text diff tool
compare text online

Loading Text Comparison Tool...

How to Use
  1. Paste or type text into the two side-by-side boxes. The diff updates automatically as you type, so you see changes immediately.
  2. Click Add revision to compare a 3rd and 4th version (up to 4 total). Remove any extra box with its remove button while keeping at least two revisions.
  3. Give each revision an optional label such as Draft, V2, or Final to keep the pairwise comparison headers readable.
  4. Read the inline diff indicators right inside each box: the first box is the baseline, and every later box highlights the words that are new relative to the previous revision in emerald. The legend above the boxes maps Added to emerald, Removed to red, and Modified to amber.
  5. Use the ignore options above the results to control what counts as a change: ignore case, ignore blank lines, and whitespace handling (significant, trim ends, or ignore all). Every result recomputes live when you toggle an option.
  6. Check the Diff summary card at the top of the results for the line totals across the whole comparison: overall similarity, added lines, removed lines, and modified lines.
  7. Expand each entry in the pairwise comparison outline to see the WinMerge-style line-aligned view with per-side line numbers, added, removed and modified lines, intra-line word highlighting on modified lines, and a similarity score for that pair.
  8. Drag a revision by its handle, or use the move up and down buttons, to reorder it. Every comparison recomputes for the new positions.
  9. Open the History panel to restore, delete, or clear saved comparisons. Your work is kept locally for 90 days and survives a reload.
How it Works

The comparison runs entirely in your browser. A built-in diff engine uses the Myers difference algorithm (the same family that powers GNU diff and git) to align your revisions. Highlighting appears in two places: inline inside each editable box, where every revision after the baseline tints the words it adds relative to the previous one in emerald, and in the pairwise results below, which show a WinMerge-style line-aligned view with per-side line numbers. There each line is classified as unchanged, added (emerald), removed (red), or modified (amber), and modified lines also get intra-line word highlighting. No text is ever uploaded, so even confidential drafts stay private, and the tool keeps working with no internet connection.

Ignore options let you decide what counts as a change: ignore case, ignore blank lines, and whitespace handling (keep whitespace significant, trim leading and trailing whitespace, or ignore all whitespace). With everything off, a whitespace-only, blank-line, newline, or case-only edit is a real change and shows as one. When you add more than two revisions, the tool builds every pairwise combination: two revisions produce one comparison, three produce three, and four produce all six. A Diff summary card at the top aggregates the line totals across every pair, including added, removed, and modified lines, plus an overall similarity, while each pair also shows its own counts and similarity score. Very large inputs automatically fall back to a faster line-level diff so the page stays responsive.

Saved comparisons live in your browser using IndexedDB and localStorage with a 90-day expiry. Entries older than 90 days are pruned automatically when you open the tool, and everything you save is restored on your next visit, even after a full page reload.

AI Agent Support (Optional)

When your browser supports WebMCP, an experimental web standard for in-page agent tools, this utility registers a small set of tools that an AI agent can call to drive the comparison for you: set a revision's text, add or remove a revision, reorder revisions, read the aggregate diff summary, and restore a saved comparison from history.

This is pure progressive enhancement. WebMCP currently ships behind a Chrome origin trial and the chrome://flags/#enable-webmcp-testing flag, so if your browser does not expose it, nothing changes and no tools are registered. Even when the tools are active they only drive the same local actions the on-page controls use, so your text still never leaves the browser and the tool stays fully private and offline.

Common Use Cases

Writing & Editing

  • • Compare draft versions to track every edit between rounds
  • • Review proofreading changes before accepting final copy
  • • Diff AI-generated rewrites against your original wording

Code & Config

  • • Spot differences between config files to debug deployments
  • • Compare log snippets to isolate what changed between runs
  • • Check pasted code blocks to confirm an intended refactor

Legal & Contracts

  • • Compare contract clauses privately without any upload
  • • Verify amended terms against the signed baseline for accuracy
  • • Track policy wording across multiple revisions for compliance

Translation & Localization

  • • Compare translated strings against the source for consistency
  • • Review localized variants side by side to catch stray edits
  • • Diff multiple phrasing options to pick the clearest wording
Frequently Asked Questions