Diff Tool

Compare two texts and see the differences highlighted. Find additions, removals, and changes.

Use Diff Tool

⌘/Ctrl + Enter compare · ⌘/Ctrl + clear
Enter text in both fields to see the diff — or click .

How text diff works

A diff algorithm compares two sequences and finds the shortest set of insertions and deletions that turns one into the other. The classic approach is the Longest Common Subsequence (LCS): everything in the LCS is preserved, and everything outside of it is either an addition or a removal. This tool runs line-by-line first (each line is a token), then, for lines that changed only partially, drops to a character-level LCS so you can see exactly which letters moved. All of that happens in your browser — your text never leaves the page, which matters when you're diffing contracts, credentials, or unreleased code.

When to use diff (code review, contract changes, content versioning)

Diffing isn't only for engineers. A few real use cases: code review when you've pasted two snippets from Slack or email and don't want to spin up a branch; contract and legal changes, where a redline between “v3 final” and “v3 final FINAL” catches silently-moved clauses; content versioning — comparing a published article with an editor's revised copy to approve changes line-by-line; config drift, where two .env files from staging and prod differ in ways nobody documented; and translation QA, lining up a source against its updated version to see what the translator actually needs to re-translate.

Line diff vs character diff

A line diff treats each line as an atomic unit — it's fast, and its output matches what git diff shows: whole lines added or removed. It's ideal for source code, where line breaks carry meaning. A character diff goes finer, highlighting the specific letters or tokens that shifted inside a line — useful for prose, long JSON values, or URLs where only a query parameter changed. This tool combines both: lines drive the primary view, and within any pair of lines that were modified (rather than wholly added or removed), a character diff paints the precise substrings that differ. That hybrid is what lets you skim a hundred-line diff and instantly see the two-character typo that mattered.

Frequently Asked Questions

Find this useful?

These tools are free and ad-free. Support the project!

Buy me a coffee

Related Tools