About the Text Diff Checker
When a contract, essay, configuration file or web page changes, spotting the edits by reading both versions is slow and unreliable. A text diff compares them line by line and highlights additions in green and deletions in red, leaving unchanged lines plain, with a summary of how many lines changed. Paste the original on one side and the new version on the other; nothing leaves your browser. It is useful for reviewing edits from a colleague, checking what a website changed in its terms, or confirming a file was updated correctly. For structured data, the JSON Diff tool compares values rather than lines, and Find and Replace helps apply bulk changes.
Under the hood is a longest-common-subsequence algorithm, the method version control systems rely on. It looks for the true match-up of the two texts instead of pairing line one with line one, so adding a paragraph at the top shows up as a single addition rather than a document in which every line appears to have moved.
Settings let you skip differences you do not care about: spaces at the start or end of lines, changes in capitalisation and empty lines. A second mode compares individual words instead of whole lines, which suits two paragraphs that differ only by a few words.
Changes are labelled in words as well as colour, so the result is clear for anyone who has difficulty telling red from green, and a summary above the result counts the additions, deletions and unchanged lines. The comparison runs in your browser, so contracts and internal files are never uploaded.
How to use the Text Diff Checker
- Paste the earlier versionPut the original or left-hand text into the first box.
- Paste the later versionPut the edited or right-hand text into the second box.
- Set what to ignoreSkip whitespace, capitals or blank lines, and pick line or word mode.
- Press CompareAdditions, deletions and unchanged text are marked, with totals shown above.
Text Diff Checker features
- Comparison by line or by word
- Additions, deletions and unchanged text clearly marked
- Totals for added, removed and unchanged lines
- Switches to ignore whitespace, case and empty lines
- True sequence alignment rather than simple line pairing
- Text labels as well as colour for every change
- Copy the summary of changes
Common uses
- Seeing exactly what an editor changed in a draft
- Comparing two versions of a configuration file
- Finding the difference between two copied lists
- Reviewing a rewritten paragraph before it goes live
- Making sure a copy and paste captured everything
Comparing two texts: how diff checkers find every change
When two versions of a document look almost the same, spotting what changed by eye is slow and unreliable. A diff checker compares them and highlights exactly which lines were added, removed or changed. Writers use it to review edits, lawyers to check contract revisions, developers to compare code and configuration, and students to see how a draft evolved. This guide explains how diffs are calculated, how to read the output and how to get cleaner comparisons.
How a diff works
A diff tool looks for the longest sequence of lines that appear in both texts in the same order, known as the longest common subsequence. Lines that are part of that shared sequence are marked unchanged. Lines only in the first text are marked removed, and lines only in the second are marked added. A changed line usually appears as a removal followed by an addition. Some tools go further and highlight the changed words inside a line, which makes small edits easy to see.
Reading the output
| Marking | Meaning |
|---|---|
| Unchanged | identical in both versions |
| Removed (often red) | in the original but not the new version |
| Added (often green or blue) | in the new version but not the original |
| Removed then added | a line that was edited |
Start by scanning the summary of how many lines were added and removed. A handful of changes in a long contract is easy to review; hundreds of changes suggest a reformat or a different version altogether.
Why whitespace can flood a comparison
Invisible differences, such as trailing spaces, tabs versus spaces or different line endings, make lines differ even when they look identical. A document that was re-saved by a different program may show every line as changed. Cleaning both texts first with Text Cleaner, or using an ignore-whitespace option where available, removes this noise and leaves only real edits.
Line-based versus word-based changes
Diffs compare lines, so a single comma added to a long paragraph marks the whole paragraph as changed. That is why prose comparisons work best when each paragraph, or even each sentence, is on its own line. For code and lists, which are naturally line-based, diffs are precise.
Common uses
- Contracts and agreements: confirm that the other side changed only what they said they changed.
- Editing and proofreading: see an editor's changes when tracked changes were not used.
- Configuration files: find the one setting that differs between a working and a broken system.
- Code reviews: check what changed between two versions of a script.
- Data exports: compare two lists to find new or missing entries.
A worked example: checking a revised contract
A freelancer receives a revised service agreement with a note saying "only the payment terms changed". Pasting the original and revised text into the diff checker shows three changed lines in the payment section, as promised, but also one line removed from the termination clause, which shortened the notice period from 30 days to 14. Without the comparison, that change would have been easy to miss. The freelancer can now ask about it before signing.
Comparing lists
For lists, sort both versions first with Text Sorter and remove duplicates. The diff then shows clearly which items were added and which were dropped, rather than reporting differences caused only by a different order.
Comparing structured data
For JSON data, differences in formatting and key order can hide real changes. JSON Diff compares JSON by structure and values, ignoring formatting, which gives far clearer results for data and API responses.
Common mistakes
- Comparing a PDF's extracted text with a Word document's text without cleaning both.
- Reading only the highlighted changes and not the surrounding context.
- Forgetting that reordered paragraphs appear as removals and additions.
Preparing documents for comparison
Before comparing, make the two texts as similar in format as possible. Copy both from the same kind of source, for example plain text from both documents, rather than one from a PDF and one from a web page. Put each paragraph on its own line, remove page numbers and running headers, and clean whitespace. These steps take a minute and turn a noisy comparison full of false differences into a short, accurate list of real edits.
Comparing translations and versions of a template
Teams that maintain the same document in several versions, such as country-specific terms and conditions or templated emails, use diffs to see how the versions have drifted apart. Comparing the master template with each local version shows exactly which sentences were customised and which were simply never updated. That makes it much easier to roll out a change consistently.
Keeping a record of changes
For important documents, save a copy of each version with a date in the file name. When questions arise later about what changed and when, you can compare any two versions in seconds. This simple habit gives you much of the benefit of version-control software without any setup, and it is invaluable when a dispute depends on the exact wording at a particular time.
Privacy
Both texts are compared in your browser. Contracts, drafts and configuration files are never uploaded, which matters when the documents are confidential.
Frequently asked questions
How does it tell a moved line from a changed one?
It finds the longest run of lines the two versions share and marks everything else as added or removed. Version control systems use the same family of algorithms. Adding a line near the top therefore leaves everything below it marked as unchanged.
When is word mode better than line mode?
When the two texts share the same overall structure but differ within sentences. Line mode would flag the entire line as deleted and then inserted again, whereas word mode highlights only the words that actually changed.
Can I compare source code?
Yes. Code is treated like any other text, and ignoring whitespace is handy when only the indentation was reformatted. For reviewing changes across a whole software project, your version control system remains the right tool.
Can I read the result without relying on colour?
Yes. Every changed line also carries a text label saying whether it was added or removed, so the comparison is readable for people with colour vision deficiency and in black-and-white printouts.
Are my documents sent anywhere?
No. The comparison happens on your own device, so legal agreements, unreleased drafts and settings files with internal details never leave your computer or get stored anywhere else.
How big can the two texts be?
Documents of a few thousand lines are compared almost instantly. Much larger files take noticeably longer, since matching up two long texts requires far more comparisons, but the result is just as accurate once it appears.