Diff two pieces of text by char / word / line with highlighting.

Switch tool
0 / 0
Original
Modified
Diff result

Paste two texts above — diff updates live.

How to use

Purpose

Online text diff tool comparing two texts at line, word, or character granularity, highlighting additions (green), deletions (red), modifications (yellow). Supports ignore whitespace, ignore case, ignore line endings. Word diff is great for prose; line diff for code review; char diff for precise analysis. Common for code review, contract comparison, doc version diff, config file diff. All comparison runs locally; sensitive content stays in the browser.

Steps

  1. Paste two texts side by side (old / new)
  2. Pick granularity: line (default, for code), word (for docs), char (for precision)
  3. Tool computes diff in real time with highlighting
  4. Side-by-side view (default) or unified view (git style)
  5. Ignore options: whitespace, case, line endings (CRLF vs LF), trailing whitespace
  6. Stats: +X lines, -Y lines, ~Z modifications
  7. Export diff report: unified diff format (paste into PRs / git apply) or HTML highlight report
  8. Synced scrolling between panes

FAQ

When to use line vs word vs char diff?
Line diff for code / configs (matches git diff). Word diff for documents (single-word changes are clear, whole-line highlighting loses detail). Char diff for precision (password / key differences). The tool switches granularity instantly.
How to handle line ending differences (CRLF vs LF)?
Windows uses CRLF (\r\n), Unix / macOS uses LF (\n). If diff shows "every line different", usually a line-ending mismatch. The "ignore line endings" option normalizes CRLF to LF before diffing. git has core.autocrlf for this.
Why is JSON/YAML diff hard to read?
Structured content should use specialized diff tools (jq-diff, json-diff). This is text diff and sensitive to formatting differences (an indent change shows the whole file different). Workaround: format both JSONs to identical indentation (jq or json-viewer), then line diff.
Can I do three-way diff like Beyond Compare?
This is two-way diff. Three-way (merge conflict resolution) is best done in IDEs (VS Code built-in) or git mergetool. Web-based three-way diff remains limited.
Can exported unified diff be applied with git apply?
Yes. "Unified diff" is the git / patch standard. Save as .patch, then `git apply file.patch`. Note: unified diff needs proper a/ b/ prefixes and hunks — the tool follows git conventions.

Use cases

  • Code Review: local changes vs main branch
  • Contract comparison: word diff to spot edited phrases
  • Config file diff: test vs prod application.yml
  • Doc version diff: v1.0 vs v2.0
  • Password/key debugging: char diff to find exact difference

Use cases

Code review, contract comparison, config diff, doc version diff, precise char diff. Developers, legal, ops, technical writers. Three granularities, ignore options, unified diff export, synced scrolling are the differentiators.