mockstack.

Diff Checker

UNIFIED · SPLIT ← Developer & Data

Compare two blocks of text, line by line or word by word.

Original
Changed
Result
READY SMALL DIFFS SAVE TO THE URL · RUNS LOCALLY

About the Diff Checker

Compares two texts and highlights exactly what changed, in your browser. Paste or drop both versions and read the differences line by line, word by word, and character by character inside changed lines.

Every Setting

Compare
By Line treats each line as the unit, the right choice for code and configs. By Word compares running prose, so a reworded sentence shows the exact words that moved.
Ignore Whitespace
Collapses runs of spaces and tabs before comparing, so a re-indent does not count as a change.
Show Spaces and Tabs
Draws each space as a faint dot and each tab as an arrow, so a change that is only indentation or a trailing space is visible.
Ignore Case
Compares without case, so Fox and fox match.
Collapse Unchanged
Folds long identical stretches down to a few lines of context around each change, the way patch files do. Turn it off to read both texts in full.
View
Unified interleaves removals and additions in one column, the patch-file style. Side by Side puts the two versions in parallel columns.
Swap Sides
Trades Original and Changed, for when you pasted them the wrong way around.
Clear
Empties that box.
Open File
Loads a file into either side, up to 2 MB. Dropping a file straight onto a box does the same.
Pane Divider
Drag the bar between the boxes to deal the width; it remembers your split, and double-clicking resets it.
Box Height
Drag a box’s bottom-right grip to make it taller; the other box follows so the pair stays even.
Previous / Next
Steps through the changes one by one, so a long document’s three edits do not hide in the scroll.
Export
Download Patch writes a standard .patch file; Copy as Markdown formats the diff for a code-review comment or ticket. Both work in line mode.

Common Questions

What do the red and green mean?
Red is what the first text had and the second dropped; green is what the second added.
Where does the share link come from?
Small comparisons are packed into the page URL as you type, so copying the address bar shares the diff. Anything over a few thousand characters stays out of the URL.

Related: JSON Formatter, Regex Flavors.