Diff checker

Paste two versions of any text — code, config, a contract, a list — and see exactly what changed, down to the word. Nothing leaves your browser.

+2 added−2 removed
1function greet(name) {1function greet(name, punctuation = "!") {
2 const msg = "Hello, " + name;2 const msg = `Hello, ${name}${punctuation}`;
3 console.log(msg);3 console.log(msg);
4 return msg;4 return msg;
5}5}

Reading the diff

Red lines exist only in the original; green lines only in the changed version. A line that was edited shows on both sides with the removed words struck through on the left and the new words highlighted on the right. Line numbers refer to each version separately, so they drift apart after an insertion.

Comparing from the command line

diff -u old.txt new.txt           # unified diff
git diff --no-index a.txt b.txt   # git's diff for any two files
git diff --word-diff              # word-level, like this page

Comparing structured data? Run both sides through the JSON formatter first so key order and indentation don't drown out real changes.

Questions

Is the text I compare uploaded?

No. The comparison runs in your browser with the Myers diff algorithm — the same one behind git diff. Nothing is sent to a server, so it is safe for code, contracts or config files.

How does it decide what changed?

It finds the longest sequence of lines the two texts share and marks everything else as added or removed. Where a removed line is replaced by an added one, it then compares them word by word so you see exactly which words changed.

Can I ignore whitespace or case?

Yes — tick "Ignore whitespace" to treat runs of spaces and indentation changes as equal, and "Ignore case" to treat A and a as equal.

Can I get a patch file?

Press "Copy unified diff" for a +/- listing in the same style as diff -u, handy for pasting into a code review or chat.