Text Diff – Compare Two Texts
Paste an original and a modified text to see exactly what was added and removed, at the level of detail you choose.
Processed locally in your browser· Your data stays in your browser.
What is Text Diff – Compare Two Texts?
A diff finds the smallest set of insertions and deletions that turns one text into another. This tool compares your two texts by characters, words or lines and highlights additions and removals with colour plus + and − markers, so the result stays readable without colour.
You can switch between an inline view and a side-by-side view (which stacks on small screens), ignore case or whitespace differences, swap the two sides, load a sample and copy the result as a standard unified diff, the format used by git and patch. The counts of added, removed and unchanged units update as you type.
How does it work?
- Paste the original text on the left and the modified text on the right.
- Pick the comparison level: characters for typos, words for prose, lines for code and configuration files.
- Choose inline or side-by-side view, and turn on “Ignore case” or “Ignore whitespace” when formatting noise hides real changes.
- Copy the unified diff to share the change, or use Swap to compare in the opposite direction.
Common use cases
- Reviewing edits between two drafts of a document or contract clause.
- Comparing two versions of a config file or script when version control is not at hand.
- Finding the one changed value between two similar API responses or logs.
- Checking that a copy-pasted or translated text really matches the source.
Examples
Try this input in the tool above:
The quick brown fox jumps over the lazy dog. Line three stays the same. This line will be removed.
Privacy
Text Diff – Compare Two Texts runs entirely in your browser. The text or files you provide are processed on your device and are not uploaded, logged or stored on our servers.
Limitations
Very large inputs are compared by lines to stay responsive (above about 200,000 characters), and comparisons above 2 million characters are refused. Word and character modes can be slow on huge, very different texts.
Frequently asked questions
What is the difference between character, word and line mode?
Line mode marks whole changed lines, like git. Word mode highlights changed words inside lines, good for prose. Character mode pinpoints single-letter edits such as typos.
What is a unified diff?
It is the standard text format that lists changed lines with − and + prefixes plus a few lines of context, grouped in hunks headed by @@. Tools like git apply and patch understand it.
Are my texts uploaded?
No. The comparison runs entirely in your browser; nothing is sent or stored.
Related tools
JSON Diff – Compare Two JSON Documents
Paste two JSON documents and see what changed in the data, regardless of key order or indentation.
JSON & Data
Find and Replace
Search a block of text and replace every occurrence, as plain text or with a regular expression and capture groups.
Text Tools
Remove Duplicate Lines
Paste a list and keep only unique lines, in the original order or sorted, with a count of what was removed.
Text Tools
Sort Lines
Order any list one item per line: A to Z, Z to A, natural, numeric or by length.
Text Tools
Word Counter
Paste an essay, article or caption and get words, characters, sentences, paragraphs, reading time and the most used words instantly.
Text Tools
Text Analyzer
A one-stop inspector for any string: size, character statistics, cryptographic digests and the raw bytes behind it.
Text Tools
CSV Viewer
Paste CSV text or open a .csv file and inspect it as a table, with row and column counts and the detected delimiter.
JSON & Data