All tools

Diff Checker

Testers

Compare two texts, files or JSON documents and see exactly what changed, down to the word. Nothing you paste leaves your browser.

  • Diff
  • Runs offline
  • Text
Differences
5 changes
5 labels:5 labels:
6 app: api6 app: api
7spec:7spec:
8 replicas: 28 replicas: 3
9 selector:9 selector:
10 matchLabels:10 matchLabels:
11 app: api11 app: api
16 spec:16 spec:
17 containers:17 containers:
18 - name: api18 - name: api
19 image: registry.example.com/api:1.14.219 image: registry.example.com/api:1.15.0
20 ports:20 ports:
21 - containerPort: 800021 - containerPort: 8000
22 env:22 env:
23 - name: LOG_LEVEL23 - name: LOG_LEVEL
24 value: info24 value: debug
25 - name: CACHE_TTL25 - name: CACHE_TTL
26 value: "300"26 value: "300"
27 - name: FEATURE_EXPORT
28 value: "true"
27 resources:29 resources:
28 requests:30 requests:
29 cpu: 250m31 cpu: 250m
30 memory: 256Mi32 memory: 256Mi
31 limits:33 limits:
32 cpu: 500m34 cpu: 500m
33 memory: 512Mi35 memory: 1Gi
34 readinessProbe:36 readinessProbe:
35 httpGet:37 httpGet:
36 path: /health/ready38 path: /health/ready

What a diff shows

A diff lines up two versions of a text and finds the smallest set of lines that were removed and added to get from one to the other. Removed lines are red, added lines are green, and a line that was edited shows both — with the words that changed highlighted inside it. Long unchanged stretches are folded so the changes stand out.

It uses the Myers algorithm, the one git diff uses by default, so the result reads the way you are used to from code review.

  • Ignore WhitespaceRe-indented or reflowed text. Careful in Python and YAML, where indentation is meaning.
  • Ignore CaseSQL keywords, hostnames, HTTP header names.
  • Ignore Line EndingsA file saved on Windows (CRLF) against one from macOS or Linux (LF).
  • JSON ModeTwo API responses whose keys came back in a different order.

How to use the diff checker

  1. Paste the original text on the left and the changed text on the right — or press Open File, or drop a file onto either box.
  2. The differences appear below as you type. Switch between Side by Side and Unified.
  3. Jump between changes with Previous and Next; click a folded row to see the unchanged lines around a change.
  4. Tick an Ignore option when the noise is not what you are looking for, or JSON Mode to compare JSON regardless of key order and formatting.
  5. Press Copy as Patch to paste the result into a ticket or a code review as a unified diff.

Examples

Review a deployment change

A Kubernetes manifest with a new image, more replicas and a new variable. Unchanged blocks fold away.

Compare two API responses

Keys in a different order, one value changed. JSON Mode shows only the real difference.

Find out why every line changed

The same file saved on Windows and on macOS. The checker names the line endings as the cause.

See past re-indentation

Code moved from two-space to four-space indents, plus one real fix. Ignore Whitespace finds the fix.

Frequently asked questions

Why does every line show as changed?

Almost always line endings: one text uses Windows line endings (CRLF), the other macOS or Linux ones (LF). They look identical but are not. The checker detects this and says so; tick Ignore Line Endings to compare the content. Line endings only survive when you open or drop the files — browsers convert them to LF when text is pasted into a box.

Does JSON Mode change my numbers?

No. JSON Mode formats both sides and sorts their keys before comparing, but it keeps every number exactly as written — 12345678901234567890 and 1.0 stay as they are, unlike tools built on JSON.parse.

Are my texts or files uploaded?

No. The comparison runs in your browser, and files are read from your disk straight into the page. You can confirm it in the Network tab of your browser's developer tools.

How large can the texts be?

Up to 5 MB on each side. Large comparisons run in the background so the page stays responsive.

What format does Copy as Patch use?

The unified diff format that git diff and diff -u print: - for removed lines, + for added ones, and @@ headers with line numbers.

Related tools

Learn more