Code Diff
Workspace
What is the Code Diff?
The Code Diff compares two code snippets and shows what changed. Paste the original code in the first panel and the modified code in the second panel, and it marks removed lines with a minus sign and added lines with a plus sign. Use it to review an edit, check a paste, or spot a single changed character before you commit or publish.
How to Use the Code Diff
- Paste the original or before code into the Original Code panel.
- Paste the modified or after code into the Modified Code panel.
- Click Process to compare the two panels.
- Read the result: lines starting with – were removed, lines starting with + were added.
- Use Copy to copy the diff, Download to save it, or Clear to start over.
Worked Example
Original Code: const a = 1; Modified Code: const a = 2; Observed output: – const a = 1; + const a = 2; The tool treats the line as changed and shows the old line as removed and the new line as added, even though only the final digit changed from 1 to 2.
Limitations
- The observed output is line-based, not token-by-token. A one-character change marks the whole line as removed and added, so it does not highlight only the changed character within the line.
- The workspace offers no language selection, syntax highlighting, side-by-side view, ignore-whitespace option, or merge controls in the observed workspace.
- The tool does not validate syntax, parse JSON or JavaScript, or report line and column errors. It compares text only.
- There is no file upload in the observed workspace. Paste or type both snippets.
- Do not paste secrets, passwords, API keys, or private code. The tool is for comparison, not for secure storage.
Frequently Asked Questions
What do the minus and plus signs mean?
Minus means the line was in the original but not in the modified version. Plus means the line was added in the modified version.
Does it show character-level changes?
No. In testing, a one-digit change showed the full line as removed and added. Compare the two lines yourself to find the exact character.
Can I compare more than two versions?
No. Compare two versions at a time. For a third version, run a second comparison against the version you want.
Does the tool send my code to a server?
The tool runs in the browser workspace. Even so, do not paste secrets or private code into any online tool.
Related Tools
From the Blog
How to Split a Bill Fairly (With Tip and Tax, Without the Awkward Maths)
Quick Answer Agree the method before ordering, split the food by what each person ordered, and split tax and tip in proportion…
Read article →How to Use the Pomodoro Technique to Actually Finish Your Work
Most productivity advice tells you what to do and leaves the when to you. That is exactly where the day falls apart.…
Read article →How to Merge PDF Files Into One Document (Without Losing Pages)
You have five PDFs. Your bank wants one file. Your university wants one file. Your client wants one file. Merging them is…
Read article →