Skip to content
HNarzędzia
en
Categories

Online diff checker - compare two texts and see the differences

Paste two texts - added, removed and changed lines are highlighted, and changed lines show exactly which words or characters differ.

  • Free
  • No sign-up
  • Private
  • Runs locally
View
In-line highlighting

Paste two texts to see the differences.

How to compare two texts

  1. 1.

    Paste the texts

    Put the original in the left box and the changed version in the right box.

  2. 2.

    Choose options

    Ignore whitespace or case if needed, and pick word or character highlighting.

  3. 3.

    Review or copy

    Use side-by-side or unified view, and copy the result as a unified diff.

How it works

The tool uses the Myers diff algorithm (the one behind git diff) to find the shortest edit script between the two texts, line by line. Adjacent removed and added lines are treated as a changed line and diffed again at word or character level. Everything runs in your browser; handles documents up to about 10,000 lines.

Side-by-side vs unified view

Side by side shows both versions with line numbers - the easiest way to read changes. Unified merges them into one list: removed lines are marked “−” and added lines “+”. The copied result uses the standard diff format:

--- a
+++ b
@@ -1,5 +1,5 @@
 a
 b
-c
+X
 d
 e

The hunk header @@ -1,5 +1,5 @@ means: starting at line 1, five lines in the old version and five in the new one. Each hunk includes three lines of context, so you can paste it into a code review, a ticket or an email.

Options and limits

  • Ignore whitespace - spaces, tabs and indentation are not treated as differences. Useful after reformatting code.
  • Ignore case - “Text” and “text” count as the same.
  • Only changes - hides unchanged lines and keeps three lines of context around each change.
  • Word or character highlighting - words suit prose and contracts; characters catch a changed comma or digit.

Different line endings (Windows CRLF vs Linux LF) are not reported as differences. The tool handles documents of up to about 10,000 lines; with thousands of changes only the first part of the result is shown until you click “Show all”.

What people use it for

  • Contracts and policies - spot which clauses changed between two drafts.
  • Config files and code - compare .env, JSON or YAML before a deployment. Beautify JSON with sorted keys first in the JSON formatter so the keys line up.
  • Edited copy - check a proofreader’s changes with character highlighting to catch punctuation fixes.

Frequently asked questions

Is my text uploaded?

+
No. The comparison runs entirely in your browser.

What is unified diff?

+
The standard format used by diff and Git: lines starting with “-” were removed, “+” were added, and a space marks unchanged context.

Can I ignore whitespace or case?

+
Yes, both options are available above the result.

What does “changed line” mean?

+
When a removed line sits next to an added line, they are paired as one changed line and compared again word by word or character by character, so you see exactly what was edited.

Can I swap the two texts?

+
Yes. “Swap” exchanges the original and the modified text, which reverses which lines appear as added and removed.

Updated: