Diff Viewer
Compare two texts and visualize the differences.
About Diff Viewer
Text diff tools are fundamental to software development — version control systems like Git use diff algorithms to track code changes, and code review platforms use side-by-side diff views to highlight modifications. Whether you're comparing API responses, configuration files, document revisions, or code snippets, a diff viewer instantly shows exactly what changed between two versions.
How Diff Algorithms Work
This tool implements the LCS (Longest Common Subsequence) algorithm — the same core approach used by Unix diff and Git. LCS finds the maximum set of lines that are identical between two texts, then classifies remaining lines as added (green) or removed (red). The result is a minimal diff that precisely identifies what changed with the fewest possible edit operations.
Common diff use cases in development: comparing JSON API responses before and after a code change to verify behavior, reviewing configuration differences between environments (dev/staging/prod), checking output changes in automated test results, auditing document revisions, and debugging unexpected behavior by diffing log outputs. Side-by-side view (as shown here) is generally preferred over unified diff (+/-) format for readability when changes are sparse.
FAQ
What is the difference between unified diff and side-by-side diff?
Can whitespace differences be ignored?
Can binary files be compared?
Related Tools
Markdown Viewer
Preview rendered Markdown text.
Word / Character Counter
Count characters, words, sentences, and bytes in real-time.
JSON Viewer
Format and visualize JSON data in a tree structure.
CSV Viewer
Visualize CSV data as a table.
Case Converter
Convert text to UPPER, lower, camelCase, snake_case, Title Case, and more.