Compare source code files and folders online
Compare two source files or two folders with comment awareness: files that differ only in comments and whitespace are marked “≈”. Edit, merge and save straight back to the original files. Everything happens in your browser — nothing is uploaded.
What it does
Recognizes comments
Comments in C/C++, Python, Java, JavaScript and TypeScript, and Python docstrings, are recognized. Changes only to comments, indentation or line breaks are shown in grey, and the file is marked “≈”.
Folder comparison
A side-by-side tree marks files and folders as same, ≈, different or on one side only, and skips .git, node_modules and similar folders.
Edit and merge
Edit either side directly; an arrow next to each difference copies it across in one click. Each side has its own undo and redo.
Save to the original files
In Chrome and Edge, save straight back to the original files and copy or delete files in folders, keeping each file’s encoding, BOM and line endings. Other browsers download the changed files.
Difference overview
A strip beside the editors shows where the differences are across the whole file; click to jump there, or press F7 / F8 for the previous / next difference.
Your code stays on your computer
Nothing is uploaded or stored, and closing the page clears everything — safe for company code.
Three steps
- 1Choose two files or two foldersDrag them in, or paste two pieces of text.
- 2Review the differencesImportant differences stand out; comment- and whitespace-only ones are grey.
- 3Merge and saveCopy the changes you want across with the arrows, then save.
Questions
Is my code uploaded?
No. Files are read and compared in your browser. Our servers never receive their contents, names or paths.
What does “≈” mean?
The two files are identical once comments and unimportant whitespace are removed. Python indentation, whether two words are separated, and the contents of strings still count. You can switch off “Comments unimportant” and “Whitespace unimportant” in the toolbar.
Why can’t some browsers save back to the original file?
Writing to files on your computer needs the File System Access API, which only Chrome and Edge support today. In Firefox and Safari you can compare and merge as usual, and changed files are saved as downloads.
How big can the folders be?
Up to 50,000 files per side after excluded folders are skipped, and up to 5 MB and 100,000 lines per file.