Diff viewer
Compare two pieces of text side by side — line, word, or character diff — privately in your browser.
About the Diff viewer
Handytool's diff viewer compares any two pieces of text — code, prose, JSON, log lines — and highlights what was added, removed, and unchanged. Switch between line, word, and character granularity, ignore case or whitespace differences, and copy a unified diff with one click. Everything runs locally with a longest-common-subsequence diff algorithm, so even large pastes stay private and instant.
Diff viewer features
- 01
Line, word and character modes
Line diff is best for code and config; word diff is great for prose and copy edits; character diff catches one-letter typos and punctuation changes.
- 02
Ignore case and whitespace
Toggle case-insensitive and whitespace-insensitive comparisons to see only meaningful differences when comparing reformatted code or rewritten copy.
- 03
Copyable unified diff
The result is rendered with classic +/- prefixes, ready to paste into a code review, a bug report, or anywhere else.
Diff viewer FAQ
- How big can the inputs be?
- Diffing is O(n·m) so very large inputs (tens of thousands of lines) will get slow, but most everyday code, prose, and log comparisons are instant. For huge files prefer line mode and ignore whitespace.
- Does this leave my texts on a server?
- No. The diff is computed in your browser — no network requests are made. Safe for proprietary code, internal docs, and confidential prose.
- What's the difference between line, word and character diff?
- Line diff treats each line as a unit and is ideal for code; word diff splits on whitespace and is best for prose; character diff is the finest grain and is useful when you want to see typos or punctuation changes.
- Why are some lines marked as both added and removed?
- When a line changes in the middle, the diff 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.
Related tools
Developer →- Live
Regex tester
Test JavaScript regular expressions against any text — see matches, capture groups, and replacements live, in your browser.
DeveloperFreeRuns locallyOpen - Live
Lorem ipsum generator
Generate placeholder text — paragraphs, sentences, or words — instantly, with optional HTML tags.
DeveloperFreeRuns locallyOpen - Live
Slugify
Turn any title into a clean, URL-safe slug — Unicode aware, with separator and stop-word options.
DeveloperFreeRuns locallyOpen
Explore other tools
All tools →- Live
PDF to JPG
Convert each page of a PDF into a sharp JPG, PNG, or WebP image right in your browser — no upload, no quality loss.
PDFFreeRuns locallyOpen - Live
Remove background
Erase the background of a photo using an in-browser AI model — no upload, your images stay on your device.
ImageFreeRuns locallyOpen - Live
Trim Video
Cut the start or end of a video with frame-level precision.
VideoFreeOpen - Live
Trim audio
Cut a section of an audio file.
AudioFreeRuns locallyOpen - Live
Markdown to HTML
Convert Markdown into clean HTML right in your browser.
DocumentFreeRuns locallyOpen