Diff Checker
Compare two text files or code snippets and see the differences highlighted.
How to Use the Diff Checker
Paste or upload your original text on the left side and the modified version on the right. The differences will be highlighted automatically. Green indicates additions, red indicates removals.
Features
- Side by Side View - See both versions with synchronized scrolling
- Inline View - Unified diff format showing all changes in one column
- Ignore Options - Skip whitespace, case, or empty line differences
- File Upload - Upload text files directly for comparison
- Export - Download the diff as a .patch file
- Statistics - See counts of added, removed, and unchanged lines
Common Use Cases
- Code Review - Compare different versions of source code
- Document Editing - Track changes between document revisions
- Configuration Files - Compare config files between environments
- Debugging - Find unexpected changes in output or logs
Useful with the JSON Formatter and XML Formatter for structured diffs.
Frequently Asked Questions
What algorithm does this tool use?
This diff checker uses the Longest Common Subsequence (LCS) algorithm, which is the same approach used by tools like Git and GNU diff. It efficiently finds the minimal set of changes between two texts.
Can I compare binary files?
This tool is designed for text comparison only. Binary files like images, PDFs, or executables cannot be meaningfully compared as text.
Is there a file size limit?
Since all processing happens in your browser, the practical limit depends on your device's memory. For best performance, we recommend comparing files under 1MB each.
What is a .patch file?
A patch file contains the differences between two files in a standard format that can be applied using tools like patch or git apply. It's commonly used to share code changes.