What is a text diff tool?
A text diff compares two strings — usually an “original” and a “modified” version — and shows what was inserted, deleted, or left unchanged. Developers use diffs for code review, config drift, pasted API responses, legal redlines, and any time you need a fast visual answer to “what changed?” without committing files to Git.
How this Text Diff tool works
Paste content into the Original and Modified panels, then click Compare. The result panel uses the industry-standard diff algorithm (via the diff library) to compute changes. Line-by-line mode shows each line with a +, −, or space prefix, soft line backgrounds for adds and removes, and line numbers on unchanged context rows. Word-by-word mode highlights inserted words in green and removed words with a strike-through so small edits inside a paragraph stand out. Editing either textarea clears the last comparison until you Compare again.
Line diff vs word diff
- Line-by-line: best for source code, logs, JSON or CSV dumps, and any content where newline boundaries matter. Shows summary counts of lines added, removed, and unchanged.
- Word-by-word: best for prose, comments, or long single-line blobs where you care about token-level edits.
Text Diff vs JSON Compare
This tool compares raw text characters. Our JSON Compare tool parses JSON and reports semantic structure differences (keys, types, array order options). Use Text Diff when the file is not JSON or when you want a literal character-level view; use JSON Compare when two JSON documents should be compared as data trees.
Privacy
Diffing runs entirely in your browser tab. Your pasted text is not sent to Dynamic Duniya servers for comparison.