Text Diff Checker
Paste an original text and a changed text and see exactly what is different. Compare line by line for documents and code, word by word for prose, or character by character for a short string such as a name or a number.
Added text is shown in green with a plus sign and removed text in red with a minus sign, and the marks use underline and strikethrough as well, so the result can be read without telling the colours apart. Nothing you paste is uploaded: the comparison runs in your browser.
How the comparison works
A diff finds the smallest set of changes that turns the first text into the second. This tool uses the Myers algorithm, the same idea behind most version-control diffs. It splits both texts into pieces (lines, words or characters), finds the longest run of pieces that appear in both in the same order, and reports everything else as removed from the original or added in the changed text.
In line mode a changed line is shown as one removed line followed by one added line. Line endings do not count as differences, so a file saved with Windows line endings compares equal to the same file with Unix line endings. Characters are kept together as a person sees them: an accented letter, an emoji or a flag is never split into pieces.
Very large or completely different texts can take a long time to compare optimally. The work is done in the background and can be cancelled, and it has a limit. If the limit is reached the tool still gives a correct result, but it shows the part it could not align as one removed block followed by one added block, and it says so.
- Line, word and character comparison.
- Side-by-side view (stacked on small screens) and inline view.
- Added and removed text are marked with signs, underline and strikethrough, not just colour.
- Options to ignore case, leading and trailing spaces, and blank lines.
- Summary of lines and words added, removed and unchanged, and a message when the texts are identical.
- Jump to the next or previous change, copy the result as a unified diff or download it as a text file.
How to use the Text Diff Checker
- Paste the Original text in the first box and the Changed text in the second.
- Choose to compare by line, word or character, and set the options you need. The result updates as you type.
- Use Next change and Previous change to move through the differences.
- Press Copy unified diff or Download .txt to keep the result.
Is it private?
Yes. Both texts stay in your browser tab. They are not uploaded, not sent to any service and not stored. The comparison runs in a background worker that is loaded from this site, and the result is only saved to your device if you press Download.
Read our tools privacy policy →
Frequently asked questions
What is the difference between line, word and character mode?
Line mode compares whole lines and is best for code, lists and documents. Word mode marks the words that changed inside a sentence. Character mode marks single characters and is useful for short strings such as names, IDs or numbers. Character mode is limited to texts of about 400,000 characters.
Why does a changed line show as removed and added?
A diff only knows that a line is no longer there and a different line appeared. It does not know that you edited it. Use word mode if you want to see which words inside a line changed.
What does the unified diff look like?
It is the format used by Git and the diff command: a header with the two names, then blocks that start with @@ and list lines beginning with a space (unchanged), a minus (removed) or a plus (added), with three unchanged lines of context around each change. The unified diff is always made line by line.
Are my texts uploaded anywhere?
No. The comparison runs in your browser, in a background worker that is part of this page. Nothing is sent to a server and nothing is saved when you close the tab.
Can it compare very large files?
Yes, up to a few million characters per side in line mode. Big comparisons run in the background with a cancel button so the page stays responsive. If the two texts are very different, the tool may show the part it could not align as one removed and one added block.