Tools › Developer
Diff Checker
Compare two texts line by line, with the changed words inside each line highlighted, side by side or as a unified diff. Or compare two JSON or YAML documents, ignoring formatting and key order.
About this tool What it's for, how to use it and an example
What it's for
See exactly what changed between two versions of some text: which lines were removed, which were added, and which words changed inside a line.
For example, when you have two versions of a config file, an email draft or a list, and want to spot the differences without reading both line by line.
How to use it
Paste the older version into Original and the newer one into Changed, or open a file under each box (or drop one on the box it’s for), then choose Compare; opening files compares as soon as both sides are filled. Unified shows one list with removed lines marked - and added lines +; Side by side puts each changed line next to what replaced it. Both number the lines of each version, and highlight the words that changed when a line was edited rather than replaced.
Ignore differences in spaces and Ignore capitals treat lines that differ only in those ways as the same. Show only changes hides unchanged text more than three lines from a change. Swap sides exchanges the two texts. Copy as patch copies the changes as a unified diff, the format of diff -u and git diff, which patch and git apply accept, headed with the files’ names when you opened files. Compare as set to JSON or YAML reads both sides as data first, sorts every object’s keys and compares them as indented JSON, so reformatting, comments and key order don’t count as changes while a changed value does; the order of items in a list still matters. If a side can’t be read, the message says which one and why. The view, Compare as and the three settings are remembered in this browser.
Example
Paste this into Original:
apples
bananas
cherries
let x = 1
and this into Changed:
apples
blueberries
cherries
let y = 1
dates
The tool reports 2 lines removed, 3 added.: bananas is replaced by blueberries, x is highlighted
as changed to y in the fourth line, and dates is added.
Good to know
In JSON and YAML modes the result is shown as JSON, so a YAML comment, anchor or date is not kept as written, and a file with several YAML documents is refused. Words are only highlighted inside a line that has at least 40% in common with the line it replaced; otherwise the whole line shows as removed and added. A missing line break at the very end of a text isn’t counted as a difference. Files are read as text, so a binary file such as an image or a Word document is refused. Very large texts with many changes are refused with a message rather than slowing the page down.
Private: this tool runs in your browser. Nothing you type, paste or choose leaves this page.
Saved you a few minutes? Say thanks with a coffee.
Something wrong with this tool, or missing from it? Report a bug or suggest a feature.