Handytool
Developer guide5 min readUpdated May 21, 2026

Instant Text Comparison

Spot Every Difference Between Two Texts in Seconds

Handytool's diff viewer highlights additions, removals, and unchanged content across line, word, or character granularity — completely in your browser, with nothing sent to a server.

Key takeaways

  • 01Three diff modes — line, word, and character — let you choose the level of granularity that fits your content.
  • 02Ignore-case and ignore-whitespace toggles filter out formatting noise so you see only meaningful changes.
  • 03The result is output as a copyable unified diff with +/- prefixes, ready for code reviews or bug reports.
  • 04All diffing happens client-side using a longest-common-subsequence algorithm — no content ever leaves the page.

When You Need a Diff Viewer

Source control shows you what changed in a file over time, but sometimes you need to compare two arbitrary blobs of text that never touched a repo: two API responses, the before/after of a quick copy edit, a config file from two environments, or two versions of a contract clause. Pasting both into a diff viewer is faster than git stash and much easier to read.

Handytool's diff viewer uses a longest-common-subsequence algorithm on the client side, so comparisons are instant for typical inputs. It works equally well for code, JSON, markdown, and plain prose — and because nothing leaves the browser, you can safely paste internal or confidential content.

How to Compare Two Texts

  1. 01

    Paste the original text into the left panel

    This is your baseline — the older version, the source file, or whatever you're comparing from.

  2. 02

    Paste the revised text into the right panel

    Add the newer version, the edited copy, or the target you want to compare against.

  3. 03

    Choose a diff mode

    Select line (best for code and configs), word (best for prose edits), or character (best for catching typos and punctuation changes).

  4. 04

    Toggle ignore-case or ignore-whitespace if needed

    These filters hide changes that don't affect meaning — useful when comparing reformatted JSON or lightly reworded copy.

  5. 05

    Copy the unified diff

    Use the copy button to grab the +/- prefixed output and paste it into a code review comment, a ticket, or a changelog.

Safe for Confidential Content

The diff runs entirely in your browser. No text is sent to Handytool's servers at any point — not when you paste, not when you switch modes, not when you copy the result. That means you can safely compare proprietary source code, internal documentation, legal drafts, or any other sensitive content.

For very large inputs — tens of thousands of lines — the LCS algorithm does slow down since its complexity grows with both input sizes. If you hit that, enable ignore-whitespace to reduce the token count, or switch to line mode which is the fastest of the three.

Diff Viewer FAQ

Does this diff viewer send my text to a server?

No. The diff is computed entirely in your browser using JavaScript. Safe for proprietary code, internal docs, and confidential content.

What is the difference between line, word, and character diff?

Line diff treats each line as a unit — ideal for code. Word diff splits on whitespace — great for prose edits. Character diff is the finest grain and surfaces single-letter typos or punctuation changes.

Why are some lines marked as both added and removed?

When a line changes in the middle, the algorithm represents it as a removed old line plus an added new line. Switch to word or character mode to see exactly what changed inside the line.

How big can the inputs be?

Most everyday code and prose comparisons are instant. Very large inputs slow down because the LCS algorithm grows with both input sizes. For huge files, prefer line mode and enable ignore-whitespace to keep it fast.

Can I compare code in different programming languages?

Yes — the diff viewer is language-agnostic. It compares raw text, so it works equally well for JavaScript, Python, JSON, YAML, or plain prose.

Related tools

Keep working with Developer tools

Developer tools