N Nouplo

Text Diff

Paste two versions of a text and see exactly which lines changed.

Output
Paste or type above to see the result here.

Your files stay on your device

This tool runs entirely in your browser. What you paste is processed on your device and is never sent to a server, so it is safe to use with tokens, keys and unpublished text.

How it works

  1. Paste the original version into the main box (A).
  2. Paste the changed version into the second box (B) below it.
  3. Press Compare. The output is a unified diff: lines starting with - exist only in A, lines starting with + exist only in B, and unmarked lines are identical.
  4. Read through the changes. For configuration files or contracts, it is often easiest to look for + and - pairs, which show a line that was edited rather than added or removed.

Frequently asked questions

Does the diff work by line, word or character?
It is line-based, like git diff and the Unix diff command. A line that changed in a single character is shown as one removed line and one added line. Word-level highlighting inside a line is not applied yet.
Which algorithm is used?
A line-based longest-common-subsequence diff, the same idea git uses. It finds a shortest sequence of line insertions and deletions that turns A into B, so moved blocks appear as a deletion in one place and an insertion in another. Long unchanged runs are collapsed to keep the output readable.
Are trailing spaces and line endings significant?
Line endings are normalised, so a Windows CRLF file and a Unix LF file with the same content show no differences. Trailing spaces and tabs inside a line are significant, however, because they are real differences in the text.
Can I compare two files?
Open each file in a text editor, copy its contents and paste them into A and B. Text files of tens of thousands of lines compare in well under a second in a modern browser.
Is either text uploaded?
No. The comparison runs entirely in your browser. You can compare draft contracts, source code with credentials, or private notes without anything leaving your device.

Related tools