Skip to content

Text Diff Tool

Paste two pieces of text and see exactly what changed. Additions are highlighted in green, deletions in red, and unchanged lines fade into the background. Works on prose, code, JSON, YAML, log output, or any text where you need to track what moved between two versions.

Why Diffing Matters

Most editorial and engineering work is iterative: a draft, then a revision, then another. When the changes get past a sentence or two, eyeballing them stops working. A diff turns what changed? into a visual answer in under a second. The same principle drives version control systems like Git, but you don't need a repo or a commit history to compare two snippets — just paste and look.

This tool runs the diff entirely in your browser using a longest-common-subsequence algorithm. Nothing uploads, which matters if you're comparing draft contracts, internal documents, or anything covered by an NDA. For structural comparisons of formatted code, pair this with a JSON formatter or code beautifier first so whitespace doesn't dominate the diff.

How It Works

The diff operates line by line. Each line in the original is matched against the modified version using a Myers-style algorithm — the same family of algorithms Git's git diff uses. Lines present in both versions stay neutral; lines only in the original render as deletions; lines only in the modified version render as additions. The ignore whitespace toggle collapses leading/trailing space differences before comparison, useful when the only change is indentation. Ignore case treats Hello and hello as the same line.

Word-level highlighting inside changed lines is a stretch goal for a future revision. For now, line granularity catches the overwhelming majority of real review cases, and it scales to thousands of lines without slowing the browser.

Common Use Cases

Writers comparing draft and revised sections of a piece. Developers reviewing what a teammate changed before pulling it down. Lawyers running redlines on contract clauses (use the HTML entity encoder first if your clauses contain quotes that get mangled in transit). Sysadmins comparing config files between staging and production. Anyone reconciling two slightly-different exports from the same source system to find the field that drifted.

How We Compare

Standalone desktop tools like Beyond Compare, Kaleidoscope, and Araxis Merge cost between $30 and $130 per seat and add directory-level and three-way merge features that matter for serious engineering work. Web-based diffs from Diffchecker, TextCompare, and similar services do what this tool does — but they upload your text to their servers. If your inputs are private, that's a hard non-starter. This tool gives you the same visual diff with the privacy guarantee that the data never crosses the network.

Frequently Asked Questions

What algorithm does this diff use?+
This tool uses a longest common subsequence (LCS) based algorithm for line-level comparison, then applies character-level diffing within changed lines to highlight exactly which characters were modified.
Can I compare code with this tool?+
Yes. The tool compares any plain text including source code, configuration files, JSON, HTML, and prose. Use the existing Diff Checker tool for syntax-highlighted code comparison.
Is there a size limit?+
The tool works well with texts up to about 10,000 lines. Very large texts may slow down since diffing runs entirely in your browser.
Does this tool upload my text?+
No. All comparison happens in your browser. Your text never leaves your device.
What diff algorithm does the tool use?+
Myers diff — the same algorithm used by git and most modern diff tools. It finds the minimal edit script to transform A into B, which produces intuitive line-by-line diffs.
Can I diff JSON objects semantically?+
Yes — toggle "JSON mode" and the tool normalises key order before diffing, so { "a": 1, "b": 2 } and { "b": 2, "a": 1 } are recognised as equal. Useful for comparing API responses.
How is whitespace handled?+
Four modes: literal (every space matters), ignore-trailing-whitespace, ignore-all-whitespace, and ignore-blank-lines. Most useful for comparing code where formatting differs but logic is identical.
Can I export the diff in unified format?+
Yes — export as unified diff (the format used by git diff and patch), side-by-side HTML, or a plain text summary of changes.

📖 Learn More

Related Article How to Compare Text Files: A Guide to Diff Tools →

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service