Compare Code Online

Paste two versions of your code to see exactly what changed. DiffNow detects the programming language, highlights the syntax, and marks changed lines down to the words and characters.

How to use it

  1. Paste the original code into the left box and the changed code into the right box (or use the Files tab to upload two source files).
  2. Click Compare. Changed, added, and deleted lines are shown side by side in color.
  3. Use Options to ignore comments, white space, or case, and Share to send a link to the comparison.

Questions

Which languages are supported?

DiffNow highlights more than 30 languages, including C, C++, C#, Java, JavaScript, TypeScript, Python, PHP, Perl, Ruby, Go, Rust, Dart, Lua, SQL, HTML, CSS, XML, JSON, YAML, Markdown, INI, PowerShell, shell scripts, MATLAB, Verilog, and VHDL. The language is detected automatically.

Can I ignore comments and formatting changes?

Yes. In Options, turn on Ignore Comments, or choose how white space and blank lines are treated, and compare again.

Can I compare whole projects or folders of code?

Upload two Zip archives on the Folders tab. To compare folders on your own computer, merge changes, or use a diff tool with Git, try ExamDiff Pro, the desktop tool that powers DiffNow, with no file size limits.