Dev Tools
Code Diff Viewer
The Code Diff Viewer compares two versions of a code snippet and highlights exactly which lines were added, removed, or changed, so you can quickly see what's different without scrolling back and forth between files. It's useful for developers reviewing a change before committing, or anyone comparing two versions of a config or script.
The comparison is computed entirely in your browser, so the two snippets you paste in — even code from a private repository — are never uploaded to a server or shared with anyone.
How to Use the Code Diff Viewer
- Open the Code Diff Viewer tool.
- Paste the original code into the left box.
- Paste the updated code into the right box.
- Review the highlighted line-by-line differences.
Frequently Asked Questions
Does the diff work on any text, or just specific programming languages?
It compares plain text line by line, so it works on any language or file format, from JavaScript and Python to config files and plain notes.
Is my code uploaded anywhere when I compare two snippets?
No, the diff is calculated locally in your browser, so neither snippet is ever sent to a server, which makes it safe for private or proprietary code.
Can it detect changes within a line, not just whole added or removed lines?
It highlights differences at the line level, showing which lines were added, removed, or modified between the two versions.