Skip to main content
NeatUtility

Text Diff Checker

Text100% Client-Side
Ready
TEXT
0 lines0 chars
0 B / 1.91 MB
About this tool, examples & FAQ

Compare original and modified text line by line, word by word, or character by character — or emit a unified patch — with a summary of additions and deletions.

Key facts

Verified capabilities and limits of this utility
InputsTwo panes: original and modified text; one empty side is allowed, both empty is rejected
Comparison modesLine, word, and character comparison plus unified patch output
OptionsIgnore-whitespace and ignore-case toggles (ignore-case applies to word/character modes); context lines shape patch output only
Max input size4 MB
Execution deadline2 s
Processing locationBrowser-only: pasted input is not uploaded

How to use

  1. Paste the original text in the left pane and the modified text in the right pane.
  2. Pick line, word, character, or unified patch mode.
  3. Set the whitespace and case options and, for patches, the context-line count.
  4. Click 'Run' to compute the diff locally in your browser.
  5. Copy or download the summary and the prefixed listing.

Example

Line diff with one changed line

Input

alpha
beta
alpha
gamma

Example output

--- Summary: +1 additions, -1 deletions ---

  alpha
- beta
+ gamma

Edge cases

Identical inputs

Identical inputs short-circuit to a no-differences message instead of an empty listing.

Ignore options normalize text

Ignore-whitespace and ignore-case compare normalized text and display the normalized form; a patch built this way may not apply to the original file.

Empty sides

Both sides empty is rejected; a single empty side compares as a pure addition or deletion.

How it works

  1. Applies missing-trailing-newline handling always; otherwise normalizes (whitespace collapsing, lowercasing) only when the corresponding ignore option is enabled, and displays the normalized text.
  2. Compares with the installed diff implementation for the selected mode.
  3. Formats additions, deletions, and unchanged lines with a plus/minus summary.
  4. Emits a unified patch against the compared texts in patch mode.

Frequently asked questions

Can I compare code or JSON payloads?

Yes. The tool compares plain text, so code snippets, JSON, XML, CSV, and configuration payloads all work. Comparison is textual, not syntax-aware: reformatting without content changes still shows as changed lines.

How is whitespace handled?

By default whitespace differences are reported, except a missing-versus-present trailing newline alone, which is normalized before comparison. Enable ignore-whitespace to normalize leading, trailing, and repeated whitespace before comparing — but note the output then shows the normalized text, not the original spacing.

Is my comparison data uploaded anywhere?

No. Comparison runs inside an isolated Web Worker in your browser and pasted input is not uploaded for processing. Clipboard, downloads, and site asset requests are separate boundaries.

Which mode should I choose?

Use line mode for documents and code, word mode for prose edits inside lines, character mode for fine-grained string changes, and unified patch mode when you need git-applicable output with ignore options off; patches built from normalized text may not apply. The context-line count only affects patch mode.

Can one side be empty?

Yes: one empty side compares as a pure addition or deletion. Both sides empty is rejected as invalid input.

References