Text Diff
Highlight the differences between two texts.
About Text Diff
Text Diff: Compare Two Texts Character by Character
Paste the original into Text 1 and the changed version into Text 2, then click Compare Texts. The result shows the combined text with every change marked inline:
- Red, starting with
[[DELETED]]=>: characters in Text 1 that are gone from Text 2. - Green, starting with
[[INSERTED]]=>: characters added in Text 2. - Unchanged text appears as is.
Comparing The quick brown fox with The quick red fox marks b, o, w and n as deleted and e, d as inserted, while the r they share stays unmarked.
Character-level vs line-level diffs
The tool compares single characters, using Python's difflib. That catches small edits a line diff hides: a changed digit in a config value, a swapped letter in a name, an extra space, or a curly quote that replaced a straight one.
The trade-off is noise. When a sentence is rewritten, a character diff shows lots of small fragments where a word or line diff would show one replaced line. For source code and long documents, git diff, diff -u or your editor's compare view work better, and git diff --word-diff sits in between.
Good uses
- Checking that two API keys, hashes or license strings match.
- Finding the one changed value between two versions of a config file or
.envfile. - Proofreading: comparing an edited paragraph with the original.
- Spotting invisible differences such as trailing spaces, tabs vs spaces, or Windows vs Unix line endings.
Tips
- Character diffs slow down on large inputs. Compare the section that changed, not a whole book.
- If the output is mostly red and green, the texts differ too much for a character diff to help. Compare smaller pieces.
- The tool sends both texts to our server for comparison. Don't paste secrets you can't afford to expose.