Text Diff
Paste an original and a changed version to see exactly what moved, with line-level and inline character highlighting. Everything runs in your browser.
Unified diff (patch)
Line diff, then character diff
The comparison happens in two passes. First alongest-common-subsequence pass over the lines finds the biggest run of lines that appear in both texts in the same order; every other line is tagged added or removed. Then, wherever a removed line is immediately followed by an added line, the tool runs a second LCS pass over the two lines' characters and highlights just the letters that differ. That is why a one-word edit shows as a mostly-grey line with a small red-and-green patch, not two entirely red-and-green lines.
Relaxing the match
Ignore whitespace trims each line before comparing, so re-indented code or reflowed prose stops showing as a change.Ignore case folds capitalisation. Both options only affect the comparison — the output still shows your text exactly as you pasted it, so you can see what the real (ignored) difference was.
The unified diff
"Copy unified diff" produces the same format git diff anddiff -u emit: a ---/+++ header, then @@ -oldStart,oldCount +newStart,newCount @@ hunks with three lines of context. A leading space marks an unchanged line,- a removal, + an addition. You can paste it into a code review, a bug report, or git apply.
Good pairings
Format both sides with the JSON formatterfirst for a clean structural diff; use theword counter to quantify how much changed; or the case converter to normalise before comparing.
Related tools
Frequently asked questions
How is the diff computed?
What does the inline character diff show?
What do 'ignore whitespace' and 'ignore case' do?
What is a unified diff?
Is this a word diff or a line diff?
Is there a size limit?
Does my text leave the browser?
Can I diff JSON or CSV?
Last reviewed: September 2026. Figures and formulas are checked against their published sources; see the site's data notes.