Diff Checker — compare text side-by-side or as a unified diff
This diff checker compares two blocks of text and highlights exactly what changed — line by line, added lines in green and removed lines in red. Paste the original on the left and the modified version on the right and the comparison updates live, so it is the fast way to compare two texts, spot what changed between two versions of a file, or review an edit before you commit it.
It works as both a side-by-side diff (two aligned columns) and a unified diff (a single column with + / − markers), so you can read the change the way you prefer. Everything runs 100% client-side in your browser — nothing you paste is uploaded, so it is safe for comparing private code, config or documents.
Usage
- Paste the original text into the "original" pane on the left and the modified text into the "modified" pane on the right.
- Read the result below: each changed line is highlighted — added lines in green, removed lines in red — with line numbers in the gutter, and the toolbar shows the +additions / −deletions counts.
- Switch between "side-by-side" and "unified" with the view buttons to read the change as two aligned columns or as one combined column with + / − prefixes.
- Tick "ignore whitespace" to skip indentation/spacing-only changes, or "ignore blank lines" to ignore added or removed empty lines, so the diff shows only the changes that matter.
- Click "copy diff" to copy the unified diff to your clipboard, or "clear" to empty both panes and start over.
Examples
- Compare two versions of a function:
original: console.log("Hi " + name) · modified: console.log(`Hello ${name}!`) - Paste an old line on the left and the rewritten line on the right. The diff marks the original line as removed (red) and the new line as added (green) so you can see exactly what the edit changed.
- Ignore whitespace-only changes:
ignore whitespace ✓ - When two versions differ only in indentation or trailing spaces, tick "ignore whitespace". Lines that differ only in spacing are treated as unchanged, so the diff surfaces real content changes instead of reformatting noise.
- Read a unified diff and copy it:
view: unified → copy diff - Switch to "unified" to get a single column where added lines start with + and removed lines with −, the way `git diff` prints. Click "copy diff" to put that unified diff on your clipboard to paste into a review or ticket.
FAQ
- How do I compare two text files or blocks of text?
- Paste the first version into the "original" pane and the second into the "modified" pane. The diff checker compares them line by line and highlights every change instantly — added lines in green, removed lines in red — with no upload and no sign-up.
- What is the difference between a side-by-side and a unified diff?
- A side-by-side diff shows the two versions in two aligned columns, so you read the original and the modified text next to each other. A unified diff merges them into one column where added lines are prefixed with + and removed lines with −, the way `git diff` and code reviews show changes. Use the view buttons to switch between them.
- Can I ignore whitespace or blank-line changes?
- Yes. Tick "ignore whitespace" to treat lines that differ only in spacing or indentation as unchanged, and "ignore blank lines" to ignore empty lines that were added or removed. This keeps the diff focused on real content changes instead of formatting noise.
- Is my text uploaded anywhere?
- No. The comparison runs entirely in your browser — the two texts are diffed locally and nothing is sent to a server. That makes it safe to compare private code, configuration or documents; 0 bytes leave your browser.
zahubtech@local $ ▋