Compare two texts and highlight the changes
All computation runs locally in your browser

The Text Diff tool compares two pieces of text and visually highlights what was added, removed, or changed. It’s especially useful when the texts are mostly similar but you need to spot a few edits quickly.
Who is this for?
Good to know: the comparison runs locally in your browser. If you share a link, include the text only when you explicitly enable “share with results”.
If you’re comparing structured data (like JSON objects), you may prefer our JSON diff calculator, which is designed for nested keys and arrays.
A quick “sanity-check” example
Suppose the only change is a number inside a sentence:
In the diff view, you should see a single small edit — exactly what you expect. If you see many scattered changes, it often means whitespace or line endings differ (see tips below).
Example 1: Compare two short paragraphs
If you want to estimate how much changed, a quick (imperfect) heuristic is “changed characters divided by total characters.”
The diff highlights are the authoritative view; the percentage is just a quick communication tool.
Example 2: Compare two lists (line-by-line)
For structured lists like JSON arrays and objects, you’ll usually get a cleaner comparison with JSON diff.
Editing marketing copy
Compare two versions of a headline or description to confirm what was rephrased (and what stayed consistent).
Reviewing configuration changes
When a config “suddenly breaks”, diff the known-good version vs the new one to spot a missing key, a typo, or a changed value.
Checking translations
Compare two translations of the same text to see which segments were changed, added, or removed.
You rewrote a paragraph
See exactly which phrases changed without manually scanning two documents.
You updated a changelog
Confirm the latest release notes only added the intended entries.
You suspect whitespace issues
A diff makes hidden changes (extra spaces, missing newlines) obvious.
You need a quick review pass
A side-by-side view is ideal for “before/after” validation.
You changed some numbers
Spot numeric edits and verify they match your intended update.
You are comparing structured JSON
Prefer JSON-aware comparison with our JSON diff tool.
Try JSON diff.
When a diff is not the best fit: if your “text” is really data (nested JSON), or if you need semantic meaning (like code-aware refactors), a specialized tool will be more accurate.
Avoid a classic mistake
If you compare two texts that are logically identical but formatted differently, the diff can look “noisy”. A simple way to reduce noise is to normalize whitespace before you compare (for example, trimming trailing spaces).
Most diff tools build a “best alignment” between the original and modified text, then mark the smallest set of insertions and deletions. A common building block is the Longest Common Subsequence (LCS).
LCS recurrence (conceptual)
Here, and are characters (or tokens) from two versions. The diff viewer uses algorithms like this (plus optimizations) to decide which parts match and which parts changed.
What counts as a “change”?
A diff typically represents changes as insertions and deletions. A “replacement” is usually shown as a deletion plus an insertion. That’s why a single edited word can appear as two operations under the hood.
Why JSON diffs can look messy in plain text
JSON is structured data. When formatting changes (indentation, key order), a plain text diff can highlight many lines. A JSON-aware diff compares parsed structures, which is often easier to read.
Try JSON diff when you’re comparing objects and arrays.
The most common cause is formatting differences: extra spaces, different line endings, or pasted rich-text artifacts. Try normalizing whitespace or ensuring both versions use consistent newlines.
Yes. The left pane is the original text and the right pane is the modified text; both are editable so you can iterate quickly.
The comparison runs in your browser. However, if you enable “share with results”, the text is embedded in the URL. URLs can be logged or shared accidentally, so use that option only when appropriate.
A text diff is syntactic, not semantic. It doesn’t understand meaning, intent, or refactors. Re-ordering blocks can also make diffs harder to interpret.
If you want deeper background, look up concepts like “diff”, “Longest Common Subsequence (LCS)”, and “edit distance”. For structured data, use tools designed for that format.
Limitations / disclaimer
This tool helps you compare text, but it can’t guarantee that two versions are “equivalent” in meaning. Always review important documents carefully.
External references / sources
Use a simple chronometer (stopwatch) to track elapsed time down to milliseconds. Runs locally in your browser.
Normalize email addresses to a standard format for easier comparison. Useful for deduplication and data cleaning. Runs locally in your browser.
Estimate the time needed to consume a total amount at a constant rate, and get an expected end time. Runs locally in your browser.
Parse and decode your JSON Web Token (JWT) and display its content. All computation runs locally in your browser.
Know which file extensions are associated to a MIME type, and which MIME type is associated to a file extension. Includes a full MIME types table.
Generate random Lorem Ipsum placeholder text with customizable paragraphs, sentences, and word counts. Runs locally in your browser.