Compare two texts or code files and see every added, removed and changed line - highlighted down to the character.
Last updated:
Comparison runs in your browser - safe for private code, contracts and configs.
| Use | Example | Also searched as |
|---|---|---|
| Code | Two versions of a function or file | code compare, compare code online |
| Text and documents | Contract or essay drafts | text compare, compare two texts, compare documents |
| JSON and config | API responses, .env, YAML | json diff, compare json online |
| Lists | Two email or ID lists | compare two lists, find differences |
| SQL and logs | Query or log output | online diff tool |
| Colour | Meaning |
|---|---|
| Red line | Removed from the original |
| Green line | Added in the changed text |
| Red and green on one row | Line modified |
| Darker highlight | The exact characters that changed |
| Tool | Command |
|---|---|
| Git (unstaged changes) | git diff |
| Git (two commits) | git diff abc123 def456 -- file.js |
| Linux / Mac | diff -u old.txt new.txt |
| Windows | fc old.txt new.txt |
| VS Code | Select two files → right-click → Compare Selected |
| Method | Good for | Limit |
|---|---|---|
| This online diff checker | Quick checks, any device, private | Very large files |
| git diff | Code in a repository | Needs files committed or staged |
| Word → Review → Compare | Word documents with formatting | Only .docx |
| Excel / Sheets formulas | Row-by-row data checks | Slow to set up |
| VS Code compare | Files on your computer | Desktop only |
Paste them in the two boxes and press Find difference. Changes are highlighted line by line and character by character.
Yes. Paste each version or copy the file contents. Use Ignore whitespace if the indentation changed.
Paste both and tick Format JSON first. Both sides are pretty-printed so only real value changes show.
No. The comparison runs entirely in your browser.
A single column where removed lines start with - and added lines with +, the format git and patch use.
It handles thousands of lines per side. Extremely large files may be slow on older devices.
Yes. Tick Ignore whitespace.
Yes. The boxes stack and the result scrolls sideways when lines are long.