SrcDiff: Online Diff Tool for Source Codes

This handy online diff tool is perfect for comparing different versions of texts, scripts (PHP, Perl, JavaScript, Java, etc.) and source codes (C, C++ and other languages). Just select Save As... to save the HTML output from your browser.


  • Clean and easily readable HTML output including both versions side by side—ready to be saved, e-mailed and shared
  • Specially adapted to texts, scripts and source codes: it does not take into account whitespace when comparing lines, so it won't show differences due to formatting only!
  • Does not try to match empty lines, which makes it able to find moved lines more efficiently
  • Wraps long lines so that you can easily read the two versions side by side
  • Displays original line numbers
  • Draws horizontal lines to guide your eyes and make comparison easy

How to use?

Just fill in the form below and click the “Show Difference” button.

1 Title:
Copy and paste your text here:

2 Title:
Copy and paste your text here:

Line length:

Please note that this script does not implement a solution to the longest common sequence problem. It is specially designed to work fast, and find individual removed or inserted blocks in a text-based file.