Text Diff
Compare two pieces of text and see exactly what changed. Line, word, or character level — all in your browser.
−3+4
Original
Modified
Diff
- The quick brown fox jumps over the lazy dog. + The quick brown fox jumps over the lazy cat. It was the best of times, it was the worst of times. - Hello world. + Hello snaptxt! TODO: add tests - TODO: fix the build + TODO: fix the build + TODO: ship it
How to use it
- 1Paste the original text on the left and the modified text on the right.
- 2Pick the diff granularity: Lines (most common), Words (prose), or Chars (tiny edits).
- 3The diff below highlights additions in green and removals in red.
Common use cases
- Sanity-check a config file change before deploying.
- Spot the difference between two log lines, API responses, or stack traces.
- Track what's changed in a piece of prose, copy, or contract text.
- Compare two versions of a generated artifact (formatted JSON, SQL, etc.).
Frequently asked questions
- What's the difference between line, word, and character diffs?
- Line diffs treat each line as a unit and show whole lines added or removed — best for code or configs. Word diffs split on whitespace, which reads naturally for prose. Character diffs highlight even tiny edits like a typo fix — useful when one line changed and you want to see exactly which character moved.
- Is my text uploaded?
- No. The diff runs entirely in your browser using the jsdiff library. Nothing leaves your device.
- Can I diff really long files?
- Yes, within reason. Browsers handle a few megabytes comfortably; multi-megabyte diffs may take a second to render.
- Does it support diffing JSON specifically?
- For semantic JSON diffing (key reordering, etc.) the JSON Formatter has a dedicated Diff mode that pretty-prints both sides first. This tool diffs the raw text you paste.
Try next
Regex Tester
Test JavaScript regular expressions with live highlighting and a capture-group inspector — plus an AI regex generator that turns plain-English descriptions into regex (on-device Gemini Nano).
Word & Character Counter
Live word, character, sentence, and paragraph counts with reading and speaking time. Free, in your browser.
Text Case Converter
Convert text between camelCase, PascalCase, snake_case, kebab-case, SCREAMING_SNAKE, Title Case and more — instantly in your browser.