Code diff
Compare two code snippets line by line with line numbers.
Processed on your device
- How it works
- 1Paste the original and modified code.
- 2Choose split or unified view.
- 3Copy or download the patch.
Loading tool…
About Code diff
Compare two code snippets line by line with line numbers, in split or unified view. You can ignore whitespace changes and download the differences as a .patch file.
Example: compare a configuration file before and after a change to see exactly which lines were modified. If only the indentation changed, turn on “Ignore whitespace” so it does not show up as a difference.
Frequently asked questions
Is my text saved or sent anywhere?
No. The text is processed in your browser and never leaves your device.
Can I apply the patch with Git?
Yes. The .patch file uses the standard unified format understood by git apply and patch.
What is the split view?
It shows the original and modified versions side by side, with matching lines aligned.