Text Diff Checker

Drag & drop files here, or click to browse.txt, .json, .yml, .yaml, .md — 1 file fills Original, 2 files fill both

Diff— YAML auto-detected

Diff📋YAML
+8 added−5 removed1 hunk
AddedRemovedContext
1
server:
−
2
port: 8080
−
3
host: "localhost"
+
2
port: 3000
+
3
host: "0.0.0.0"
4
database:
−
5
name: "app_db"
−
6
pool: 10
+
5
name: "app_db_prod"
+
6
pool: 20
+
7
ssl: true
8
logging:
−
8
level: "info"
+
9
level: "debug"
+
10
metrics:
+
11
enabled: true

What is a text diff?

A diff is a line-by-line comparison of two texts that marks what was added, removed or left unchanged. It comes from the Unix diff command and powers code review, version control and patch files. A good diff makes a change reviewable at a glance instead of forcing you to re-read both documents.

This tool takes an original and a changed text and returns a colour-coded listing: green for inserted lines, red for deleted ones and neutral for context. A unified diff reads top to bottom — the '---' and '+++' header lines name the two files, a line starting with a space is unchanged, a '-' line was removed and a '+' line was added. Comparing 'const host = "localhost";' with 'const host = "127.0.0.1";' therefore shows exactly one deletion and one addition.

How to use the text diff checker

  1. Paste the original version into the left field.
  2. Paste the changed version into the right field.
  3. Click Compare to highlight every added and removed line.
  4. Use Clear to reset both fields and start a new comparison.

Frequently asked questions about diffing text

Is the comparison done in my browser?

Yes. Both texts are compared locally with a line-diff algorithm, so nothing is uploaded — safe for proprietary code, logs and personal data.

What do the + and - markers mean?

A '-' line was removed and a '+' line was added relative to the original; unmarked lines are unchanged context, exactly as in a git diff or patch file.

Why does the diff change after reformatting?

Diffing is literal: indentation, line endings and trailing whitespace count as changes. Normalise whitespace first if formatting differences are noise.

Back to home