Compare Two Texts
Highlight the differences between two texts, by lines, words or characters.
Processed in your browserFree
Related tools
- Clean Up TextRemove extra spaces, blank lines and duplicates, rejoin lines broken by a PDF, sort lines.
- Word CounterCount words, characters, sentences and paragraphs, with an estimated reading time.
- JSON Formatter and ValidatorIndent, validate (with the line and column of the error), minify or convert JSON to CSV.
- Change Text CaseConvert a text to UPPERCASE, lowercase, Sentence case, Title Case, snake_case, kebab-case or camelCase.
About this tool
Compare two versions of a text, a contract, a list or a code file: additions appear in green, deletions in red, with a summary of the changes. Choose the granularity (lines, words or characters), ignore case or whitespace, then copy the diff in unified format.
How to use this tool
- 1Paste the original text on the left and the modified text on the right.
- 2Choose the granularity (lines, words, characters).
- 3Read the highlighted differences or copy the diff.
Limits to know
- The algorithm (Myers, via the open source "diff" library) finds the smallest set of changes; on very different texts, the result may look less readable than a manual comparison.
- Texts up to about 2 MB to stay smooth.
- Accepted formats
- Text
- Maximum size
- 2 MB
Privacy and file processing
The text is processed instantly in your browser: nothing is sent to a server, nothing is kept.
Read our privacy policyFrequently asked questions
"Words" to proofread a new version of a text, "Lines" for code or lists, "Characters" to spot a typo or a changed digit. Line mode is the most readable on long documents.
Yes, each area accepts a text file (.txt, .md, .csv…). For two PDFs, use "Compare two PDFs", which extracts the text page by page.
