Diff Checker
Identify differences between two versions of text with visual line-by-line comparison. Added lines highlighted in green, removed lines in red, and changed sections clearly marked. Useful for code reviews, legal document comparison, editing feedback, and version control visualization.
What does this tool do?
The Diff Checker performs line-level comparison between two text versions using a diff algorithm. It presents results in side-by-side or unified views. In side-by-side mode, corresponding lines from both versions are shown aligned. In unified mode, changes are shown sequentially with markers. Statistics summarize the scope of changes: lines added, removed, and modified. The ignore-whitespace option allows focusing on substantive changes while ignoring formatting differences.
How it works
The tool implements a standard diff algorithm based on longest common subsequence (LCS) to find the minimal set of changes between two texts. Input is split into lines, then the algorithm finds matching sequences and identifies insertions, deletions, and modifications. Side-by-side view aligns lines: matching lines appear on same row, additions show right-only, deletions show left-only, modifications show both with highlighting. Unified view shows the patch format with +/- markers. Complexity is O(N×M) in worst case but optimized for typical inputs. A 200ms watchdog prevents freezing on extremely large inputs.
Features
- Side-by-side or unified diff view
- Line-level adds (green), removes (red), changes
- Whitespace-only changes optional ignore
- Stats: lines added, removed, changed
- Copy unified diff in standard patch format
- 200ms timeout protection for large inputs
- 100% client-side processing
How to use
- 1
Paste original text
Enter the original version in the left panel. This is the baseline for comparison.
- 2
Paste modified text
Enter the revised version in the right panel. The tool compares against the original to find changes.
- 3
Read the diff
Added lines highlight green (present in modified, not in original). Removed lines highlight red (present in original, not in modified). Changed lines show both versions.
- 4
Toggle view and options
Switch between side-by-side and unified views. Enable ignore-whitespace if formatting changes clutter the results.
- 5
Copy or export
Copy the unified diff for email, code review systems, or patch files. The format follows standard diff/patch conventions.
Common use cases
Code review
Compare code versions to review changes, verify refactoring didn't alter behavior, and check pull request diffs.
Legal document comparison
Compare contract versions to identify exactly what language changed between negotiation rounds.
Editing and proofreading
Review changes made by editors, verify only intended modifications were made, and compare drafts.
Configuration management
Compare config files before and after changes to document modifications for change management.
Tips & best practices
- Line-level diff means changes within a line show the entire line as modified — for word-level diff, consider other specialized tools
- Ignore whitespace is useful for comparing formatted vs unformatted code, or documents with rewrapped paragraphs
- Very large files (multi-megabyte) may be slow due to O(n²) complexity — for huge files, consider specialized diff tools
- Unified diff format (patch format) can be applied with the patch command on Unix systems