Runs in this tab. A token, a key, a config — whatever you paste stays local.
Loading the tool…
Free Online Text Diff Checker
How it works
What a diff algorithm actually computes
A diff finds the longest common subsequence of the two inputs — the largest set of lines, in order, present in both. Everything outside it is an insertion or a deletion; a change is just a deletion and an insertion on the same spot. That is why a diff sometimes aligns oddly around repeated blank lines or repeated braces: several alignments are equally minimal, and the algorithm picks one.
- Line diff
- The default. Compares whole lines, which is what you want for code, configs and logs.
- Word diff
- Splits on word boundaries, so a reworded paragraph shows the changed words rather than the whole line.
- Whitespace
- Trailing spaces and a missing final newline are real differences. Ignoring whitespace is a choice, not the default.
- Line endings
- CRLF and LF differ byte for byte, so a file that has been through Windows can show every line as changed.
- Common subsequence
- Unchanged lines are context, shown between the changed ones so a difference has somewhere to sit.
How to use it
How to compare two texts online
- 01
Paste the original
The version you are comparing against, on the left.
- 02
Paste the new version
Additions and removals are marked as soon as both sides have content.
- 03
Switch to word level if needed
Line diff for code; word diff for prose, where one line can be a paragraph.
Where it earns its keep
Where a text diff answers the question
- Comparing a staging config against production to find the one differing key.
- Checking what an editor or a formatter changed in a file you did not expect it to touch.
- Diffing two API responses to see which field moved.
- Reviewing an edit to a document when there is no version history to consult.
Questions
Text Diff, answered
Are the texts I paste uploaded?
No. The comparison runs in this browser tab. That is the point for configs and environment files, which routinely contain connection strings and API keys that should never be pasted into a hosted diff service.
Can it diff files rather than pasted text?
It compares text you paste in. For binary files a diff is not meaningful anyway — use the checksum tool to establish whether two files differ at all.
Why does the diff look misaligned?
Because several alignments can be equally minimal. Around repeated lines — blank lines, closing braces — the algorithm picks one valid answer and it may not be the one you had in mind. Switching to word level often makes the real change obvious.
Does it ignore whitespace?
Not by default, because whitespace differences are frequently the bug: a trailing space in an environment variable, a tab where YAML demands spaces, a missing final newline. You can turn it off when it is noise.