Side-by-side or unified
Read the two versions in parallel columns with line numbers, or as one stream with + and − markers.
Compare two texts and see every added, removed and changed line or word
This tool is completely free — no credits required. All processing happens in your browser.
Original
Changed
When two versions of a document, config file or code snippet look almost the same, the differences are easy to miss. This checker lines the versions up and marks exactly what was added and removed, down to a single word or character.
The checker uses the diff-match-patch library, which implements Eugene Myers' O(ND) difference algorithm, the same family of algorithms behind most version-control diffs.
Both texts are split into lines, words (with the spaces between them) or single characters, depending on the mode you choose.
With Ignore case, "Hello" and "hello" count as the same. With Ignore whitespace, runs of spaces and tabs count as one space and leading or trailing spaces on a line are ignored.
The algorithm finds the smallest set of insertions and deletions that turns the original into the changed text. In word and character modes a semantic cleanup step merges tiny fragments into readable whole-word changes.
Removed units are struck through and added units are underlined. In line mode a changed line appears as a removed line beside its replacement.
Read the two versions in parallel columns with line numbers, or as one stream with + and − markers.
Line mode suits code and lists, word mode suits prose, and character mode catches typos and changed digits.
Skip differences such as SELECT versus select when only the content matters.
Re-indented code or text with extra spaces compares as unchanged, so the real edits stand out.
See how many lines, words or characters were added, removed and left unchanged.
The comparison runs on your device. Nothing you paste is sent to a server.
Anyone who needs to know exactly what changed between two versions of a text.
Compare config files, API responses or code snippets without setting up a repository.
Review what an editor changed in a draft, word by word.
Spot changed clauses between two versions of a contract or policy.
Compare expected and actual output, or two log excerpts, to find where they diverge.
Use lines for code, CSV and lists; words for paragraphs; characters for IDs, numbers and short strings.
If one version was re-indented or re-wrapped, turn on Ignore whitespace so only real edits are marked.
Minified JSON or SQL is one long line. Run both versions through a formatter, then compare them line by line.
Copy diff as text gives a plain version with - and + prefixes that you can paste into a ticket or chat.
Line mode treats each line as one unit, so any edit marks the whole line as changed. Word mode compares words and the spaces between them. Character mode compares every character, which is the most detailed.
It uses diff-match-patch, an implementation of Myers' difference algorithm, followed by a semantic cleanup in word and character modes that groups small fragments into readable changes.
Runs of spaces, tabs and other whitespace count as a single space. In line mode, spaces at the start and end of a line are also ignored. Blank lines are still compared.
In line mode a line either matches or it doesn't, so an edited line appears as the old line removed next to the new line added. Switch to word mode to see the exact words that changed.
The two texts together can be up to 1,000,000 characters. Very different large texts may take a moment; the comparison stops refining after two seconds and still returns a correct diff.
No. The comparison runs in your browser and nothing you paste is stored or sent anywhere.