Diff Checker

Compare two texts or files and see every change, with word and character highlights, change navigation and a JSON mode. Free, private, no sign-up.

About Diff Checker

This diff checker compares two versions of a text or file and shows exactly what changed. Paste or open the original on one side and the changed version on the other, and the result updates as you type: added, deleted and changed lines are marked, with the changed words or characters highlighted inside each changed line.

Lines are matched by content, so inserting or deleting a line marks only that line, not everything after it. The comparison runs in your browser: contracts, code, configuration and drafts are never uploaded or saved, there's no sign-up, and the installed app works offline.

How to use

  1. Paste the original text into the Original box and the new version into the Changed box, or use Open file (or drop a file) on each side.
  2. Read the result below as it updates. Choose the side-by-side or inline view, and Smart, Words or Characters highlighting.
  3. Turn on Ignore Whitespace, Ignore Case or Ignore Blank Lines if those differences don't matter.
  4. Step through the changes with the arrows or Alt+↑ and Alt+↓, then copy or download the result as a .diff file if you need it.

Features

Matches lines by content
A real diff (the Myers algorithm) pairs up the lines both versions share, so an inserted paragraph shows as one addition and the lines after it stay unchanged.
Smart, word or character highlighting
Inside a changed line, Words marks whole words and Characters marks single characters. Smart picks characters for a small edit, such as a transposed digit in INV-0431 and INV-0413, and words for anything bigger.
Open or drop files
Each side takes a text file up to 5 MB from Open file or drag and drop, and shows its name. Binary files such as images are refused.
Compare as JSON
When both sides are JSON objects or arrays, the checker can sort the keys and format both the same way before comparing, so a different key order or indentation isn't a change. Array order still counts, and numbers are compared exactly as written, so long IDs aren't rounded.
Hide unchanged lines
Long runs of unchanged lines fold away, leaving 3 lines of context around each change, with a row to expand any fold. Turn it off to see every line.
Jump between changes
The arrows step to the previous or next change and show where you are, such as Change 3 of 12. Alt+↑ and Alt+↓ do the same outside the text boxes.
Ignore options
Ignore Whitespace treats runs of spaces and tabs as one space and ignores spaces at the ends of lines. Ignore Case drops upper and lower case. Ignore Blank Lines skips empty lines added or removed.
Export a .diff
Copy as diff and Download .diff give the comparison as a unified diff, the format Git uses, with the file names when the texts came from files.

Frequently asked questions

Is the text I compare kept private?

Yes. Both texts and any files you open stay in your browser: they are compared on your device, never uploaded, and not stored, so reloading the page clears them.

Can I compare two files?

Yes. Use Open file on each side, or drop a file onto it. Any plain text file up to 5 MB works, such as code, CSV, JSON, XML, Markdown or logs. Word, PDF and Excel files aren't plain text, so copy their text in instead.

Why does it say the line endings differ?

Windows files usually end lines with CRLF and macOS or Linux files with LF. The checker treats both the same, so they don't show as changes, and adds a note when two opened files use different styles.

How do I compare two JSON documents?

Paste or open both, or send one from the JSON Viewer with Compare in Diff Checker. When both sides are valid JSON, Compare as JSON is switched on: keys are sorted and formatting ignored, so only real data changes show. If a side starts like JSON but isn't valid, the checker compares the text instead and says where the JSON breaks.

How do I apply the changes with Git?

Download .diff gives a unified diff with a/ and b/ file names, like git diff. When you opened the files, save it next to the original and run git apply, or patch -p1, to turn the original into the changed version. Pasted text is named original and changed, so rename those lines first.

Is there a size limit?

Files can be up to 5 MB each. Above 1 million characters on a side, the result updates when you select Compare instead of as you type. If two very large texts are too different to compare in a few seconds, the checker stops and says so, so try smaller parts.