Text diff checker
| Original | Changed |
|---|
What this diff tool does
Two versions of a contract, a configuration file or a chunk of code, and the question is always the same: what actually changed? Paste both here and the answer is marked in place, without either version being uploaded anywhere.
How to use it
- 1 Paste the older version on the left and the newer one on the right.
- 2 Pick line or word level, and tick the options if spacing or capitalisation should not count as a change.
- 3 Press Compare, then switch between side by side and inline, or copy the result as a unified diff.
Why a naive comparison is useless
Walking both texts in step and marking every position where they differ is the obvious approach, and it falls apart the moment a single line is inserted: everything after it shifts by one and the whole rest of the document lights up as changed. This page uses the Myers algorithm instead, which searches for the shortest edit script, so an inserted line is reported as one insertion.
Line level or word level
Line level answers which lines moved, appeared or vanished, which is what you want for code and configuration. Word level goes inside a changed pair of lines and marks only the words that differ, which is what you want for prose where a single word was replaced. Both are shown from the same comparison, so switching does not recompute anything from scratch.
- Merhaba dunya + Merhaba guzel dunya
Merhaba guzel dunya
Ignoring spaces and letter case
The options change what counts as the same, not what you see. Text is compared through a normalised key while the lines on screen stay exactly as you typed them, so a file that was only re-indented shows no changes at all, and you can still read the real spacing in the result.
Both texts stay on your machine
Diff tools are used on things people are not free to share: draft contracts, deployment configuration, patient notes, unreleased code. The comparison here happens in the page, so there is no upload, no temporary copy on a server and nothing to delete afterwards.