Text Diff Checker

Paste two versions of any text, code, config or log file to see exactly what changed. Changed lines are paired up and the words that differ inside them are highlighted. Nothing is uploaded.

How to compare two texts

  1. Paste the original on the left and the new version on the right, or use Open file or drag a file onto either box.
  2. The difference appears below as you type. Removed lines are red, added lines are green, and within a changed line the exact words that differ are highlighted.
  3. Switch to Unified for the compact view Git uses, or download a .patch file you can apply with git apply or patch -p0.

Lines, words or characters?

Ignoring noise

Ignore whitespace hides changes that are only indentation or trailing spaces, which is useful after reformatting code. Ignore case treats SELECT and select as the same. Windows (CRLF) and Unix (LF) line endings are always treated as equal. Hide unchanged lines keeps three lines of context around each change so long files stay readable.

Comparing JSON or XML?

For structured data, a text diff reports changes caused by key order or formatting. The JSON & XML Compare tool compares the data itself and lists differences by path, such as $.items[2].price.

Frequently asked questions

Is my text uploaded to a server?

No. The comparison runs entirely in your browser, so it's safe for private code, contracts or logs. The last texts you compared are kept only in this browser.

How large can the files be?

Files up to 20 MB can be opened. Very large files with many scattered changes can take a few seconds; if a comparison takes longer than 5 seconds it is stopped and you are told.

What is a unified diff?

The format Git and the patch tool use: removed lines start with a minus, added lines with a plus, and a few unchanged lines around each change give context. Download it with the .patch button.

Why are two lines shown as different when they look the same?

They probably differ in invisible characters such as trailing spaces, tabs versus spaces, or a non-breaking space. Tick Ignore whitespace, or compare by characters to see exactly where.

Can I compare Word or PDF documents?

Copy the text out of the document and paste it here. The tool compares plain text, not formatting.