Text Diff Viewer
Compare two pieces of text and see line-by-line or word-by-word additions and removals.
No differences detected.
How to use
- Paste the original text on the left, the new version on the right.
- Choose line-mode for code/configs, word-mode for prose.
- Toggle 'ignore whitespace' if formatting changed but content didn't.
- Read the inline diff and added / removed counts.
About this tool
ShowHide
Compare two blocks of text and see exactly what changed, with additions and deletions marked inline. The choice of mode is the whole trick. Line mode is what you want for code, config and logs, where a line is the unit that means something, and it can ignore whitespace so a re-indented block does not drown the real change. Word mode compares within the line, which is what prose needs: reflow a paragraph and a line-based diff will mark every line as changed even though one word moved, while word mode points straight at the word. Whitespace is compared as part of the text in word mode, so a doubled space or a switched-out non-breaking space shows up rather than hiding. Nothing is uploaded — both texts stay in the page.
Frequently asked questions
Is the diff stored anywhere?
No. Diffing happens locally with the 'diff' library — neither side of the text leaves your browser.
Word vs line mode?
Line mode shows full lines as add/remove blocks — best for source code, JSON, config files. Word mode highlights individual word changes within a paragraph — best for prose, docs, captions.
What does 'ignore whitespace' do?
In line mode, it treats lines as equal if they differ only by leading/trailing spaces or tabs. Useful when comparing reformatted code.
How big can the inputs be?
Tens of thousands of lines work, but the diff is O(n²) so very large files will get slow. For huge files, prefer 'git diff' or a desktop tool.
A reformatted paragraph shows as entirely changed. What should I use?
Word mode. Reflowing a paragraph moves the line breaks, and a line-based diff can only report that every line differs — technically true and useless. Word mode compares inside the lines and points at the words that actually moved, which is what prose review needs.
Two lines look identical but are marked as different.
Something invisible differs: a trailing space, a tab where spaces were, a non-breaking space pasted from a web page, or a CRLF line ending against an LF one. Ignore-whitespace in line mode hides the first three. For the line endings, the line-endings converter is the tool that shows you which is which.
Guides on this topic
Related tools
JSON Diff
Compare two JSON documents structurally — see exactly which keys were added, removed, or changed.
Developer
Patch / Diff Inspector
Read a unified diff or .patch file: files touched, insertions and deletions per file, and the malformed hunks that make git apply fail.
Developer
Character & Word Counter
Count characters, words, sentences, lines, and bytes in real time.
Text
Word Frequency Counter
Count how often each word appears in your text — with stopword filtering, minimum length, and CSV export.
Text
Word Wrap — Reflow Text to a Column Width
Hard-wrap text to a fixed line width, breaking at word boundaries, in your browser.
Text
Remove Line Breaks
Join wrapped lines back into clean, flowing text — strip the hard line breaks you get when copying from PDFs or emails, while keeping real paragraphs.
Text