Compare two texts side by side or in unified view. Highlights added, removed, and changed lines with word-level and character-level precision. Export diffs, jump between changes, and see a similarity score. The most complete free text diff tool online.
Diff Editor
Paste text to comparePaste text in both panels above and click Compare to see the diff.
Supports code, prose, config files, JSON, YAML, and any plain text.
What Is a Text Compare Tool?
A text compare (or diff) tool compares two versions of a text and highlights exactly what changed between them. It shows added lines, removed lines, and unchanged lines. The WritoryBuzz Text Compare tool goes further: it highlights individual changed words within modified lines, shows a similarity score, allows exporting the diff as HTML or patch format, and lets you jump between changes with keyboard-style navigation.
Text diff tools are essential for developers reviewing code changes, writers comparing document revisions, QA engineers verifying content edits, and system administrators comparing configuration files. This tool runs entirely in your browser with no server required, meaning your content never leaves your device.
What Is the Myers Diff Algorithm?
The Myers diff algorithm, published by Eugene Myers in 1986, is the standard algorithm used by Git, GNU diff, and most modern diff tools including this one. It finds the shortest edit script between two sequences: the minimum number of insertions and deletions needed to transform one text into another.
It runs in O(ND) time where N is the sum of the lengths of the two sequences and D is the number of differences, making it fast even for large files. When you run git diff or review a pull request on GitHub, you are looking at Myers diff output. This tool uses the same algorithm to produce accurate and minimal diffs.
Side by Side vs Unified Diff View
| Feature | Side by Side | Unified |
|---|---|---|
| Layout | Two columns: original left, modified right | Single column with +/- prefixes |
| Best for | Small to medium changes, visual comparison | Large files, patch files, Git-style output |
| Line alignment | Corresponding lines aligned side by side | Removed lines before added lines |
| Standard format | IDE and code review tools (VS Code, GitHub) | Git patch format, email patches |
| Whitespace use | Wider, requires two columns | More compact, single column |
Word-Level and Character-Level Diff
Basic diff tools mark an entire line as changed even if only one word in a 200-word sentence was edited. This tool provides two levels of sub-line highlighting:
- Word-level diff: Within a changed line, individual words that were added or removed are highlighted. A word that was replaced shows the old version struck through in red and the new version highlighted in green. This makes it much faster to spot small edits in long lines.
- Character-level diff: Within changed words, individual characters that differ are highlighted. Useful for spotting typos, single-character variable name changes, or punctuation differences that are invisible at the line level.
Common Use Cases for Text Diff
- Code review: Compare a function before and after refactoring without needing a full Git setup.
- Document revision: See exactly what changed between a first draft and a final version of a contract, specification, or article.
- Configuration management: Compare
.envfiles, YAML configs, or JSON settings between environments to find mismatches. - Content QA: Verify that an editor's changes match the brief before publishing.
- Database query output: Compare query results between two runs to verify data consistency.
- Translation verification: Check that a translated document has the same structure and line count as the source.
- Log analysis: Compare two log files to find new error patterns introduced between deployments.
Privacy note: All diff processing runs entirely in your browser using JavaScript. Neither panel's content is sent to any server, logged, or stored. You can safely compare confidential code, contracts, API keys, and private documents.
What Is a Similarity Score?
The similarity score expresses how similar two texts are as a percentage from 0 to 100. A score of 100 percent means the texts are identical. A score of 0 percent means they share no common lines. It is calculated as (unchanged lines / max(left lines, right lines)) x 100. This gives a quick measure of how much a document has changed, useful when reviewing contract drafts, article revisions, or configuration updates where you want to confirm only small changes were made.
Frequently Asked Questions About Text Diff
Encode and decode HTML entities with named, decimal, hex modes and a 252-entity reference table.
Open Tool →Analyze keyword frequency, density, bigrams, trigrams, and over-optimization in any text.
Open Tool →Reverse text by characters, words, or lines. Check palindromes and flip any string instantly.
Open Tool →