Skip to content
toolsdocks

Diff checker online: compare two texts

Paste or open an original and a changed version to see what was added, removed or kept, at the level of detail you choose.

Runs on your device
Loading tool…

How to use

  1. Paste the older text into Original and the newer text into Changed, or open a file for either side.
  2. Choose Compare by Line, Word or Character.
  3. Choose a View: Side by side or Inline.
  4. Tick Ignore case, Ignore spaces at line ends or Ignore whitespace to hide differences you do not care about.
  5. Tick Hide unchanged lines for long documents, then use Changed regions to jump from edit to edit.
  6. Check the counts of added, removed and unchanged units, and download a unified .patch file if you need one.

Worked example

Comparing “The quick brown fox” with “The quick red fox” in word mode marks “brown” removed and “red” added.

Supported formats and limits

InputTwo texts or files
OutputHighlighted diff, Unified diff (.patch)
EngineMyers diff (jsdiff) at line, word and character level

Tips for best results

  • Use Word mode for prose such as contracts, essays and policies, because it shows a reworded sentence as a few swapped words instead of a whole replaced line.
  • Use Line mode for code and configuration files, and Character mode for short strings such as license keys, coupon codes and IDs where one wrong letter matters.
  • If one version came from Windows and the other from a Mac or Linux machine, Ignore spaces at line ends removes the noise from stray trailing spaces.
  • To compare two JSON files fairly, format both with the same indent and sorted keys first.
  • The .patch download is a unified diff that git apply can read, so you can hand a change to a developer.

Limits

  • If either input is over 5 MB, the texts are compared by line only.
  • Inputs over 5 MB are compared by line only. Texts that are almost entirely different may stop with a Too many differences to finish message.

Questions

How do I find the differences between two texts?

Paste the original on the left and the changed version on the right. Additions and deletions are highlighted at the level you choose (line, word or character) with a summary of how much changed.

Which comparison level should I choose?

Line mode suits code and lists and highlights changed words inside changed lines. Word mode suits prose: comparing “The quick brown fox” with “The quick red fox” marks brown removed and red added. Character mode shows single-letter edits.

Can it ignore case or whitespace?

Yes. Ignore case, and ignore whitespace (leading and trailing spaces in line mode, spacing differences in word mode). Windows and Unix line endings are treated as the same.

What does the .patch download contain?

A unified diff with 3 lines of context that tools such as patch and git apply understand. It is an exact comparison, so the ignore options do not apply to it.

Privacy

Runs on your device. Files and text are processed in this browser tab and are not uploaded.

See the privacy policy for how toolsdocks handles data.