Text Compare
Compare two texts and highlight every difference — live, in your browser.
About the Text Compare Tool
What is a text compare tool?
A text compare tool — also called a diff checker — takes two blocks of text and shows you exactly what changed between them. Paste your original on the left and the new version on the right, and every difference is highlighted as you type: removed lines in red, added lines in green, and reworded lines with the changed words picked out so you don't have to hunt for them. It works just as well on a paragraph of prose as it does on a config file or a few hundred lines of code.
This one runs entirely in your browser. There's no "compare" button to wait on and nothing is ever uploaded, so you can safely diff private source code, an API key, or a confidential contract. You get a live tally of additions, deletions, and an overall similarity score, plus side-by-side and inline views and a one-click export of the result as a standard .diff file.
How to Use This Tool
- Add both versions. Paste your original text on the left and the changed text on the right, drag a file onto either box, or use the Open buttons. Hit Sample to see it in action.
- Read the highlights. The comparison updates live — red marks what was removed, green marks what was added, and modified lines show the exact words that changed.
- Switch the view. Use side-by-side to see both versions at once, or inline for a stacked, Git-style diff that reads well on a phone.
- Tune the match. Toggle Ignore case, Ignore whitespace, Trim lines, or Ignore blank lines to filter out differences you don't care about, and Only show differences to hide the unchanged lines.
- Take the result. Copy the diff to your clipboard or download it as a
.difffile.
Common Use Cases
Comparing two texts is a daily job for developers, writers, and anyone who works with documents:
- Reviewing code changes: Check your edits before opening a pull request, or see what changed between two versions of a file.
- Comparing document drafts: Writers and legal teams spot exactly which sentences were added, cut, or reworded between revisions.
- Debugging config files: Diff an old
.envornginx.confagainst the new one to find the line that broke a deploy. - Catching invisible changes: A stray space, a smart quote, or a changed letter case shows up immediately with whitespace and case options.
- Checking API responses: Paste an old JSON payload next to a new one to see exactly what a third-party changed.
Need to tidy the text first? Run it through our Text Cleaner or Remove Line Breaks tool, or browse all our free text tools.
Frequently Asked Questions
What's the difference between "text compare" and a "diff checker"?
Nothing — they're two names for the same thing. "Diff" is short for "difference," a term that comes from programming, while "text compare" is the plain-English version. This tool does both jobs: it compares two texts and shows the differences, whether you're checking code or proofreading a document.
Does it highlight the exact words that changed?
Yes. When a line is edited rather than fully added or removed, the tool lines the two versions up and highlights only the words (or characters) that actually differ, so a one-word change in a long sentence is easy to spot instead of the whole line lighting up.
What does the similarity percentage mean?
It's a quick measure of how much the two texts have in common, based on how many lines they share. 100% means they're identical; a lower number means more was added or removed. It's handy for gauging at a glance whether two files are nearly the same or wildly different.
Can I ignore differences in spacing or capitalization?
Yes. Ignore case treats "Hello" and "hello" as the same, Ignore whitespace overlooks spacing and indentation differences, Trim lines ignores leading and trailing spaces, and Ignore blank lines skips empty lines. Combine them to focus only on the changes that matter to you.
Is my text uploaded anywhere?
No. The entire comparison runs locally in your browser with JavaScript, so nothing you paste is sent to a server, stored, or logged. You can compare sensitive code or documents safely, and the tool keeps working offline once the page has loaded.
Will it compare minified code or very long lines?
It will, but the result is most useful when each statement is on its own line. If an entire script sits on one line, the tool can only show that the whole line changed. Run it through a formatter first and you'll get a far more precise, line-by-line comparison.