Compare two texts (diff checker)

Paste the original and the changed text to see every difference highlighted. Switch between side-by-side and inline views, and between line, word and character detail.

  • ๐Ÿ”’ Runs on your device
  • โค’ 0 bytes uploaded
  • โœ“ Free, no sign-up, no watermark
Loading the toolโ€ฆ

How to use Text Compare (Diff)

  1. Paste the original text on the left and the changed text on the right.
  2. Choose side by side or inline, and line, word or character detail.
  3. Turn on Only show changes to fold long unchanged parts.
  4. Download a .diff file if you need a patch.

About Text Compare (Diff)

The comparison uses the Myers diff algorithm (the same idea as git diff) to find the smallest set of changes between the two texts. Changed lines are paired so you can see exactly which words changed inside each line.

The .diff download is a standard unified diff that tools such as git apply and patch understand.

Is it private?

Yes. Text Compare (Diff) runs entirely in your web browser: what you type into it is never sent to Nolo or anyone else, and the page's security policy only allows it to talk to nolotools.com. The site sends only two small things: the words typed in the optional search box, to find a tool, and, the first time you use a tool on a page, that tool's name for an anonymous daily count of tool use (nothing about you, your files or what you typed). Nothing is stored either: close the page and it is gone. How Nolo works.

Questions and answers

Are my texts uploaded to compare them?

No. The comparison runs in your browser with the open-source jsdiff library. Nothing is sent anywhere, so it is safe for contracts, code and private documents.

What is the difference between line, word and character mode?

Line mode marks whole lines that changed. Word mode also highlights the exact words that changed inside those lines, which is best for prose. Character mode highlights single characters, useful for typos, IDs and code.

Can it ignore case or whitespace?

Yes. Ignore case treats "Hello" and "hello" as equal. Ignore whitespace treats lines as equal when they differ only in indentation, trailing spaces or the number of spaces and tabs between words.

Can I compare files?

Yes. Use Open file on each side to load text files such as .txt, .md, .csv, .json or source code. Word and PDF documents need to be copied as text first.

How large can the texts be?

Tens of thousands of lines work well. Very large texts that are completely different can take too long; the tool then tells you to compare smaller parts.