Diff Checker
Compare two texts and highlight the differences. Perfect for code review and document comparison.
Original Text
Modified Text
What is a Diff?
A diff (short for difference) shows the changes between two versions of text or code. It's an essential tool for code review, version control, and document comparison. The concept originated from the Unix diff command created in the 1970s.
Diff Notation:
+
Added lines (green)
-
Removed lines (red)
~
Modified lines (yellow)
Common Use Cases:
- Reviewing code changes before committing
- Comparing configuration files between environments
- Tracking changes in documents or contracts
- Debugging by comparing working vs broken versions
Frequently Asked Questions
Yes! All comparison happens entirely in your browser using JavaScript. Your text is never uploaded to any server. You can even use this tool offline once the page is loaded.
When enabled, the tool ignores differences in spaces, tabs, and indentation. This is useful when comparing code where only the formatting has changed, not the actual content.
Currently, you need to paste the file contents into the text areas. For comparing files directly from your computer, consider using tools like VS Code's built-in diff viewer or the
diff command in terminal.