Skip to tool
Text

Text Diff

Compare two texts by line, word, or character in a local worker.

Input0 characters
Reference0 characters
Diff result

Enter both sides to compare.

Ready

Prefer a native workflow?

Keep Text Diff one shortcut away.

DevSexy for Mac puts the same private workflow in a focused desktop app, with global shortcuts and no browser tab to manage.

Global shortcutOffline-readyLocal processing
Try the Mac app free

This browser tool remains free.

Review evidence table · A and B stay immutable

A diff is an alignment under a declared policy.

Red and green are not meaning by themselves. Granularity chooses the tokens; ignore switches change the evidence; repeated text can admit more than one equally minimal alignment.

VERSION A · IMMUTABLE

01 timeout = 30

02 region = us-east

03 retries = 2

VERSION B · IMMUTABLE

01 timeout = 45

02 region = eu-west

03 retries = 2

04 audit = true

Alignment ribbon

=01timeout =
-30removed
+45added
=02region =
-us-eastremoved
+eu-westadded
+audit = truenew line

GRANULARITY LENSES

LINEdeployment review

structure and complete lines

WORDprose revision

terms inside stable context

CHARpunctuation incident

small or invisible changes

Comparison policy receipt

CaseOFFA ≠ a
WhitespaceOFFtab ≠ spaces
NewlinesSTRUCTURALLF and final newline witnessed
RuntimeWORKERmain UI remains responsive

Invisible-change booth

CRLF → LF␍␊ → ␊
tab → spaces⇥ → ····
NBSP → space⍽ → ·
final newline removed␊ → ∅
NFC → NFDé → e + ◌́

Review lens dispatch

Configuration deploylineignored indentation may be semantic
Prose editwordpunctuation can disappear in a broad view
Snapshot outputline + invisible boothline endings create noisy runs
Localization parityword / characternormalization and placeholders need separate checks

Semantic boundary

Text alignment is not program understanding.

This tool does not parse ASTs, understand renamed symbols, classify moved blocks, merge competing edits, preserve rich-document layout, or prove that a change is safe.

Run a comparison with a declared policy

Each example includes both originals, the comparison rules, and the expected difference. Invisible characters are labelled below; the editor receives the actual characters.

Loading an example replaces both inputs and all comparison options.

Review a configuration change by line

Line · side-by-side · all ignore rules off.

Input

timeout = 30
region = us-east
retries = 2

Reference

timeout = 45
region = eu-west
retries = 2
audit = true

Expected result: timeout and region change, retries stays equal, and audit is added. Use word or character mode to inspect smaller edits.

Find a one-character colour-code change

Character · inline · all ignore rules off.

Input

#aabbcc

Reference

#aabbcd

Expected result: the last c is removed and d is added. The code below shows the exported inline text.

#aabbc[-c-]{+d+}

Distinguish NBSP from a normal space

Character · inline · whitespace is not ignored. U+00A0 is a non-breaking space; U+0020 is a normal space.

Input

user[U+00A0]name

Reference

user[U+0020]name

Expected result: one character is removed and another added, even though the two inputs look almost identical. Inspect their code points in the Unicode tool.

Compare CRLF and LF with EOL ignored

Character · inline · Ignore EOL on; case and whitespace rules off. The displayed \r and \n labels describe real line endings.

Input

alpha\r\nbeta\r\n

Reference

alpha\nbeta\n

Expected result: no differences under this policy. Turn Ignore EOL off to expose the two carriage returns; a missing final newline would still be a difference.

Check what the text difference means

Validate JSON before comparing payloads

Use the same formatting settings for both payloads so layout changes do not obscure changed values.

Inspect invisible Unicode characters

Identify code points, whitespace and normalization differences behind text that looks the same.

Validate YAML or TOML configuration

A text diff cannot prove that indentation or a changed value is valid in the configuration language.

Compare locally from your Mac

Use the Mac app for recurring comparisons, keyboard access and offline work.

Direct answer

What is Text Diff?

Compare text online by line, word, or character in a browser Worker, expose whitespace and line endings, and record every ignore rule applied.

What can it do?

  • Line
  • Word
  • Character

How to use Text Diff

  1. 01

    Choose the comparison granularity

    Use line mode for complete configuration lines, word for prose, and character for punctuation or invisible characters.

  2. 02

    Set both inputs and ignore rules

    Paste both originals or load an example. Keep ignore rules off first; enable each rule only when the hidden distinction is irrelevant.

  3. 03

    Review and export the evidence

    Check the highlighted changes and policy badges. Select inline, side-by-side, or unified view; copy formatted text, patch, or HTML as needed.

Frequently asked questions

Why can identical-looking text show a difference?
NBSP and ordinary spaces have different code points; visually similar Unicode forms can also differ. This comparison does not automatically normalize Unicode.
What does Ignore whitespace change?
It trims each line and collapses runs of horizontal whitespace to a space before comparison. Indentation and spacing can carry meaning in configuration, so enable it deliberately.
Does Ignore EOL remove the final newline?
No. It normalizes CRLF and CR to LF for comparison. A final newline present on only one side still creates a difference.