Diff checker
Compare two texts line by line.
About the Diff checker
This diff checker compares two blocks of text line by line and shows which lines were added, removed or left unchanged. Use it to compare two versions of a config file, a code snippet or a document draft. The comparison runs in your browser, and the text you paste is not sent to a server.
How to use it
- Paste the older text into Original and the newer text into Modified, or click Load sample.
- Tick Ignore whitespace or Ignore case if those differences don't matter to you.
- Read the Differences table: + marks added lines, - marks removed lines, with line numbers from both sides.
- Click Swap to reverse the comparison, or Reset to clear both fields.
How lines are matched
The tool finds the longest common sequence of lines and treats everything else as added or removed. A line that was edited shows as one removed line followed by one added line, without highlighting the changed characters.
Ignore options
Ignore whitespace collapses runs of spaces and tabs and trims each line before comparing, so indentation changes don't count. Ignore case compares lines without regard to letter case. The table still shows the original text.
Questions
- How do I compare two text files?
- Open each file, copy its contents and paste one into Original and the other into Modified. The differences appear as soon as both fields have text.
- Can it ignore indentation changes?
- Yes. Tick Ignore whitespace and lines that differ only in spacing or indentation are treated as unchanged.
- What do the added, removed and unchanged counts mean?
- They count lines. Added lines exist only in Modified, removed lines exist only in Original, and unchanged lines appear in both.