Diff Checker

Paste two versions of text or code and see the diff: added, removed and changed lines, with changed words highlighted. Download it. Free, nothing uploaded.

Runs in your browser. Your files are never uploaded. How it works

Diff Checker compares two versions of a text or a file and shows the diff: lines that were removed, lines that were added, and inside each changed line the exact words that differ. It works for code, configuration files, logs, documents and lists. The comparison runs in your browser, so your code is never uploaded.

How to check a diff

  1. Paste the original version on the left and the new version on the right. Or drop a text file on each box.
  2. Tick Ignore spaces and line indentation for reformatted code, or Ignore case if upper and lower case do not matter.
  3. Click Compare.
  4. Read the diff Side by side, or in One column for a compact list of changes.
  5. Tick Show only changed lines to hide unchanged code around the edits, and Download diff to save it.

Reading the result

You see It means
Red line on the left Removed in the new version
Green line on the right Added in the new version
Red and green side by side A changed line; the changed words are highlighted
Line numbers The position in each version

The summary above the diff counts changed, added, removed and unchanged lines.

For developers

  • Config files: find the setting that differs between a working and a broken environment, such as two .env.example, YAML or INI files. Remove real secrets first.
  • Reformatted code: with Ignore spaces and line indentation on, a file that was re-indented or switched from tabs to spaces shows only the lines that really changed.
  • JSON: format both versions with the same indent and sorted keys in the JSON Formatter, then compare. Keys in a different order no longer show as changes.
  • Logs and output: compare the output of two runs to spot the line where they part ways.
  • Sharing a change: download the diff as a text file and attach it to a ticket or a message.

Also for writing

The same diff works for prose. Paste two drafts of an article, a contract or a translation, and the changed words are highlighted inside each sentence, so even a single comma stands out. For more tips on documents, see Text Compare.

Good to know

Diff Checker compares plain text. Formatting such as bold, fonts or layout is not compared. To compare Word or PDF documents, copy their text out first, for example with PDF to Text.

Frequently asked questions

What is a diff?

A diff is a list of the differences between two versions of a text. It shows which lines were removed from the first version and which were added in the second. Developers use diffs to review code changes before they are saved.

Can I check a diff of code?

Yes. Paste two versions of a file, any language. Tick Ignore spaces and line indentation if the code was reformatted, so only real changes are shown.

What does the downloaded diff look like?

A text file that starts with the names of the two versions. Removed lines start with a minus, added lines with a plus and unchanged lines with a space, so it is easy to read in any editor.

Is my code sent to a server?

No. The diff is worked out in your browser. Source code, keys in config files and private documents stay on your computer.

Related tools