Text Diff Checker | Highlight Differences Between Two Texts
Paste two blocks of text and instantly see what was added and removed, highlighted inline. Switch between line-by-line and character-by-character comparison, and optionally ignore case or whitespace differences. Everything runs in your browser — your text is never sent anywhere.
Your text is processed entirely in your browser and is never sent anywhere.
Diff result
- Added
- 0
- Removed
- 0
- Unchanged
- 0
Enter text in both A and B to see the differences here.
How to use
- Paste the original text into Text A and the changed text into Text B.
- Choose a comparison mode (line or character) and, if needed, turn on the ignore-case or ignore-whitespace options.
- The diff updates as you type. Green highlights are additions, red highlights are removals.
How it works
Tokenization
In line mode, the text is split into lines at each newline (\n) and compared line by line. In character mode, the text is compared one character (Unicode code point) at a time — surrogate-pair characters like emoji are treated as a single character.
The diff algorithm
This tool uses the widely-used Myers diff algorithm (via the jsdiff library) to compute the smallest set of additions and removals needed to turn Text A into Text B. The entire computation happens in your browser.
Ignore case
When this is on, parts that differ only in uppercase/lowercase letters are treated as unchanged. In that case, the casing shown in the result comes from Text B, not Text A.
Ignore whitespace differences
When this is on, line mode ignores leading/trailing whitespace differences on each line, and character mode treats different kinds of whitespace (regular space, full-width space, tab, etc.) as equivalent. Whitespace that was actually added or removed is still detected as a change — this option only ignores differences in the kind of whitespace.
About the added/removed counts
The "Added", "Removed", and "Unchanged" counts shown above the result are line counts in line mode, or character counts in character mode.
What gets sent anywhere
Nothing. Text A, Text B, the selected mode, and the option settings are never sent outside your browser — the entire diff computation runs client-side in JavaScript.
FAQ
Does this tool send my text anywhere?
No. The diff is computed entirely in your browser using JavaScript, and no text is sent to a server.
Should I use line mode or character mode?
Line mode works well when the order of lines matters, such as code or lists. Character mode is better for spotting small wording changes within a sentence, or for languages like Japanese where words aren't separated by spaces.
How are case-only or whitespace-only differences shown?
If you turn on "Ignore case" or "Ignore whitespace differences", those differences are treated as unchanged and not highlighted. With the options off, they're detected as normal removals and additions.
Can this handle long documents?
Text up to a few thousand lines compares without noticeable delay. It isn't designed for comparing very large files.
I entered the texts in the wrong boxes — can I swap them?
Yes, the "Swap A and B" button swaps the contents of the two boxes and recalculates the diff immediately.
Related tools
- Character Counter — Manuscript Pages & Social Media LimitsCount characters and lines in real time, plus a 400-character manuscript-page estimate and UTF-8 byte size. Check whether your text fits X, Threads, Instagram, LinkedIn or Bluesky limits, or any custom limit you set. Everything runs in your browser — nothing is ever sent anywhere.
- Emoji Picker — Search by Name or Meaning, Copy in One ClickSearch over 210 emoji across 9 categories (smileys, gestures, animals, food, and more) by name or keyword, and copy them in one click. Your search terms and copied emoji are processed entirely in your browser — nothing is ever sent anywhere.
- Full-width / Half-width Converter — Numbers, Letters & KatakanaConvert numbers, letters, katakana and spaces between full-width and half-width forms, all at once. Handles half-width katakana voiced marks correctly (e.g. ガ → ガ). Everything runs in your browser — nothing is ever sent anywhere.
- Kaomoji Maker — Browse by Emotion, Copy in One ClickSearch Japanese emoticons (kaomoji) across 12 emotion and mood categories — happy, sad, angry, shy, and more — by keyword or category, and copy any of them with one click. Your search terms and copied kaomoji stay in your browser and are never sent anywhere.
- All tools