📊 Code Diff

Side-by-side comparison of two code snippets. Highlights added, removed and modified lines with diff statistics.

📊 Code Diff Comparison
Paste code or text on both sides and click Compare:
📄 Original (A)
📄 New Version (B)
❓ FAQ
Uses a line-based LCS (Longest Common Subsequence) algorithm for text diff comparison. Compares line by line to accurately identify added, removed and modified lines.
Supports all programming languages and plain text diff comparison, including JavaScript, Python, Java, C++, HTML, CSS, JSON, XML, etc.
We recommend no more than 1000 lines per side. Larger texts may cause browser lag. For very large files, consider using a dedicated diff tool.