Diff Checker
Compare text and code differences
Original (Left)
β
Modified (Right)
About This Tool
The Diff Checker compares two texts side by side and highlights the differences line by line. Lines highlighted in green were added to the right version, while lines in red were removed. Unchanged lines appear without any highlighting.
This tool uses an LCS (Longest Common Subsequence) based diff algorithm, which finds the minimal set of changes needed to transform the left text into the right text. The output follows unified diff conventions: + for additions and β for removals.
How to Use
- Paste your original text in the left panel.
- Paste the modified version in the right panel.
- Click Compare to see the highlighted diff.
- Use Ignore trailing whitespace to treat lines that differ only in trailing spaces as equal. Click Copy Diff to export the result.
Use Cases
Developers compare code before and after a refactor or bug fix. Writers check what changed between two drafts. Data analysts compare configuration files. Students compare their essay draft with the final version.
FAQ
- What does "Ignore trailing whitespace" do? β It trims trailing spaces from each line before comparison, so lines that are identical except for trailing spaces are treated as equal. Useful when comparing code from different editors.
- Is the comparison case-sensitive? β Yes. The comparison is case-sensitive by default. "Hello" and "hello" would be treated as different lines.
- Can I compare binary files? β No. This tool is designed for plain text comparison only. Binary files should be compared using dedicated tools.