Compare two pieces of code and highlight additions, deletions, and changes. Supports Unified, Side-by-side, and Inline view modes.
Enter or paste code into the "Original" and "Modified" text areas.
Choose from Unified (Git diff format), Side-by-side (parallel), or Inline (simple) view mode.
Review the highlighted diff and copy it in unified diff format if needed.
Code Diff is an online tool that compares two pieces of code or text and visually highlights additions, deletions, and changes. Switch between three modes: Unified view similar to Git diff, Side-by-side view for parallel comparison, and simple Inline view. All processing happens in your browser, making it safe to compare sensitive code.
The text diff tool offers character, word, and line comparison modes. Code Diff focuses on line-based comparison with developer-oriented features like line numbers and Git-style unified diff output.
No. All processing happens entirely in your browser. Your code is never sent to any server.
Code Diff performs language-agnostic line-by-line comparison, so it works with any programming language or text file.