Loading tools...
Loading tools...
Compare two blocks of text and highlight exactly what changed, line by line. Added, removed, and unchanged lines — all computed in your browser.
Paste text in both panels and click Compare
Or click Load Sample to see an example
LCS diff algorithm, line numbers, stats — all running in your browser.
Uses the Longest Common Subsequence algorithm — the same approach as git diff and GNU diff — for accurate line-by-line comparison of any text.
Lines present in text B but not in text A are highlighted in green with a + prefix. These are the new additions in the modified version.
Lines present in text A but not in text B are highlighted in red with a - prefix. These are the deletions that were made from the original.
Both original and modified line numbers are shown to the left of each diff line, making it easy to locate changes in the source files.
A summary bar shows the total count of added lines, removed lines, and unchanged lines for a quick overview of how much changed.
All comparison happens in your browser using pure JavaScript. No text is sent to any server. Code, documents, and personal text stay private.
This tool uses the Longest Common Subsequence (LCS) algorithm. LCS finds the largest set of lines appearing in both texts in the same order. Lines not in the LCS are marked removed (red) or added (green). This is the same algorithm used by git diff and GNU diff.
A diff shows the changes between two text versions: which lines were added, removed, or unchanged. Diffs are fundamental to version control (Git), code reviews, document comparison, and debugging. They let you see exactly what changed without reading both versions in full.
Yes. The diff works on any plain text — source code, JSON, YAML, SQL, markdown, config files, or prose. It compares line by line, which is the standard approach for code. All processing is done entirely in your browser — your code is never sent to any server.
Disclaimer: This tool is provided for informational and educational purposes only. Preview renderings are approximations and may differ from actual platform displays due to platform updates, caching, or rendering differences. We fetch publicly available metadata and do not store or share your URLs. Platforms may cache old data even after you update your content—use their official debug tools to refresh caches. ZIRA Software is not liable for any decisions made based on this tool's output.