Skip to main content
Ink·tab

Compare two texts · line and word level

Paste two versions and see exactly where they differ, side by side.

added 1removed 0modified 2
Diff view6 rows
1{1{
2 "name": "util-platform",2 "name": "util-platform",
3 "tools": ["json", "qr", "image"],3 "tools": ["json", "qr", "image", "regex", "diff"],
4 "version": "0.1.0"4 "version": "0.2.0",
5+ "license": "MIT"
5}6}
Everything happens in your browser. Nothing is uploaded.

When to use it

To compare two versions at a glance — not just code diffs, but contracts, drafts, and translations too. Lines are aligned first; changed lines get a second pass with word-level highlights.

How it works

Paste the original (A) on the left and the new version (B) on the right. The split view below updates as you type. Toggle "Ignore whitespace" to skip changes that are only indentation or line breaks. Use "↔ Swap" to flip sides.

Reading the diff

  • Red — line exists only in A (removed).
  • Green — line added in B.
  • Yellow with inline highlights — line modified; red highlights mark words removed, green highlights mark words added.
  • The counter at the top (+N · -M · ~K) tracks added, removed, and modified lines.

Tips

  • Whitespace-only changes — toggle "Ignore whitespace" to filter them. Useful when comparing formatter output.
  • Long lines — wrap automatically, and word-level highlights stay aligned with the source positions.
  • Compare two JSON versions — use the "→ Diff" button in the JSON formatter to send the current output straight to the A pane.

Both texts compare in-page

The jsdiff library is bundled client-side. Compare two versions of code, contracts, or drafts — the comparison itself never leaks outside.

Frequently asked questions

At what unit is the comparison made?
Two-layer: line-level + word-level. When a line is marked changed, word-level highlighting shows exactly which fragments differ.
How is whitespace handled?
By default whitespace counts as a difference. Toggle 'Ignore whitespace' to treat lines that differ only by indentation or trailing space as equal.
Can I paste the diff result elsewhere?
Yes. Copy in unified diff format (`-` / `+` line prefixes). Paste directly into code-review comments or PR descriptions.