Diff Checker
Compare two texts side by side with color-coded diff output. LCS-based algorithm, split and unified views, line-by-line or word-by-word diff. Free online diff checker.
Why Use a Diff Checker?
A diff checker helps you quickly identify differences between two versions of text, code, or documents. Whether you're reviewing code changes, comparing configuration files, or checking edits, a visual diff makes it easy to spot additions, deletions, and modifications at a glance.
Key Features
- LCS (Longest Common Subsequence) diff algorithm for accurate comparison
- Color-coded output: green for added, red for removed, unchanged in default
- Split and unified view modes
- Line-by-line or word-by-word diff toggle
- Statistics: additions, deletions, and unchanged line counts
How It Works
- Paste the original text in the left textarea
- Paste the modified text in the right textarea
- Choose line-by-line or word-by-word diff mode
- Review the color-coded diff output in split or unified view
Technical Details
This diff checker implements the LCS (Longest Common Subsequence) algorithm entirely client-side in JavaScript. It supports both line-level and word-level comparison with O(n*m) time complexity. The split view shows original and modified side by side, while unified view combines both in a single column with + and - prefixes.
Frequently Asked Questions
What algorithm does the diff checker use?
The diff checker uses the Longest Common Subsequence (LCS) algorithm to compute the minimum edit sequence between two texts. This ensures the most accurate and compact diff output.
What's the difference between line-by-line and word-by-word diff?
Line-by-line diff compares entire lines, marking added or removed lines. Word-by-word diff breaks text into tokens and compares at the word level, showing more granular changes within lines.
Is my text sent to a server?
No. All diff computation happens entirely in your browser. Your text never leaves your device.
Related tools
JSON Formatter & Validator
Format, beautify, validate, and minify JSON data with tree view
XML Formatter & Beautifier
Format, beautify, minify, and validate XML documents
CSV to JSON Converter
Convert CSV data to JSON array format with customizable delimiters
JSON to CSV Converter
Convert JSON array data to CSV format with auto-detected columns
JSON to YAML Converter
Convert JSON data to YAML format with proper indentation
YAML to JSON Converter
Convert YAML data to JSON format with support for nested structures