Text Diff Checker: Compare Two Texts and See What Changed
Part of Text tools: See all Text tools.
What is Text Diff?
Paste two versions of a text and see exactly what changed. Removed lines are shown in red and added lines in green, in their original order with line numbers from both versions, and the words that changed inside an edited line are highlighted. You can ignore spacing or upper/lower-case differences, switch between a one-column and a side-by-side view, jump from change to change, and copy or download the result as a standard unified diff. The comparison runs in your browser.
How to use Text Diff
- Paste the older version into Original text and the newer version into Modified text.
- Press Compare. The summary line tells you how many blocks changed and how many lines were removed, added and left unchanged.
- Read the result: red rows were removed, green rows were added, and the darker highlight inside a row marks the exact words that changed. Unchanged lines around each change are kept for context; the rest are folded into a "lines hidden" row.
- Use Previous change and Next change to jump through a long result, or change Whitespace, Unchanged lines, View or Ignore case and the result updates.
- Press Copy as unified diff or Download .diff if you want to paste the changes into a ticket, an email or a code review.
Why use this tool?
Reading two versions side by side and hunting for the difference is slow, and it is easy to miss one changed word in a long paragraph. This tool lines the two versions up for you, shows each change once, in order, and points to the words that changed, so you can check an edited contract clause, a config file or a translation draft in a minute instead of rereading both versions.
FAQ
- What do the colours mean?
- Red rows are lines that are in the original but not in the modified text. Green rows are lines that are new in the modified text. When a line was edited rather than fully replaced, it shows as a red row followed by a green row, and the words that changed are highlighted more strongly inside each row. Plain rows are unchanged lines kept for context.
- Does it show changes inside a line?
- Yes. When an edited line still shares some words with its new version, the removed words are struck through on the red row and the added words are highlighted on the green row. If the two lines have nothing in common, they are simply shown as one removed and one added line.
- Can I ignore spaces or capital letters?
- Yes. Under Whitespace you can ignore spaces at the ends of lines, or ignore all spacing changes (runs of spaces and tabs count as one space). Tick Ignore upper/lower case to treat "Total" and "total" as the same. The result always shows your original text; the options only change what counts as a difference.
- Can I compare code, JSON or CSV?
- Yes. Any plain text works, including source code, config files, JSON, XML, CSV and subtitles. The comparison is line by line, so if one version was reformatted (for example, JSON minified onto one line), format both versions the same way first, or almost every line will show as changed.
- Can I export the result?
- Yes. Copy as unified diff and Download .diff give you the changes in the standard unified diff format (the one Git and most code review tools use), with three lines of context around each change.
- Is there a size limit?
- Each text can have up to 20,000 lines. If the two versions differ in more than about 3,000 places, the tool asks you to compare smaller sections, because a result that large is not readable and could slow your browser down.
- Is my text uploaded or stored?
- No. The comparison runs in JavaScript in your browser, and the text you paste is not sent to our server or saved. Closing or reloading the page clears it.
Text Diff — In-Depth Guide
A diff answers one question: what is different between these two versions? This tool finds the longest run of lines the two versions share and marks everything else as removed or added. That is the same approach Git and other version-control tools use, so the result reads the same way: a red row is a line that went away, a green row is a line that arrived, and an edited line is a red row followed by its green replacement.
Because the comparison works on whole lines, it is best for text where lines mean something: code, config files, CSV rows, lists, subtitles or contracts with one clause per paragraph. For flowing prose, a reworded sentence that pushes the rest of the paragraph onto different lines can make a large block look changed. The word highlighting inside each edited line helps here, because you can see the handful of words that really changed.
Most noisy results come from formatting, not content. Different indentation, tabs versus spaces, spaces at the ends of lines and Windows versus Mac line endings can all make identical-looking lines differ. Line endings are handled for you; for spacing, choose Ignore spaces at line ends or Ignore all spacing changes. If one version was run through a formatter, format the other one the same way before comparing.
Tip: put the older version on the left and the newer one on the right, so red means "taken out" and green means "put in". If you pasted them the wrong way round, press Swap sides. When you need to share the result, the unified diff export can be pasted into a code review, a ticket or an email and read by anyone used to Git.
Finding the needle without reading the haystack
Two versions of a document, two revisions of a config file, two drafts of a contract — and somewhere between them, a change you need to find. Reading both versions in parallel and trying to spot the difference is slow and unreliable; the human eye glides over a single altered word in a wall of identical text. A diff tool does mechanically what your eyes cannot: it compares the two versions line by line, identifies exactly what was added, removed, and changed, and shows you the result in colour — additions in green, deletions in red — so the change leaps out instead of hiding. It turns "find what is different" from a careful read into a glance.
How a diff decides what changed
A diff is not magic, and understanding its logic helps you read its output. The tool finds the longest sequence of lines the two versions share, then marks everything else as added or removed relative to that common backbone. The consequence worth knowing: a diff thinks in terms of added and deleted lines, not "edited" lines. When you change a word in the middle of a line, the diff typically reports the whole old line as removed and the whole new line as added, because to a line-based comparison that is what happened. This is why a tiny edit can show as a red line and a green line that look almost identical. To save you scanning the pair word by word, this tool highlights the words that changed inside each pair.
The jobs diffs were made for
Developers live in diffs — every code review, every version-control commit, every "what changed since yesterday?" is a diff — and the same mechanism serves far beyond code. Comparing two versions of a legal document to confirm exactly which clauses a counterparty altered. Verifying that a configuration change touched only the setting you intended and nothing else. Checking what an editor changed in your draft. Confirming two supposedly-identical files really are identical. Anywhere the question is "what is different between these two texts, precisely?", a diff answers it completely, where a manual read answers it only approximately and only if you are lucky.
Getting clean, readable diffs
A diff is only as useful as it is readable, and a few things wreck readability. The biggest is whitespace and line-ending noise: if one version uses different indentation or came from a system with different line endings, the diff can light up as entirely changed even though the visible content is identical, drowning your real change in false positives. Line endings are normalised for you, and the Whitespace option can ignore spaces at line ends or all spacing changes. The second is reformatting: if the new version was run through a formatter that re-wrapped lines, the diff explodes because every line moved, even though the content barely changed — which is exactly why developers commit formatting changes separately from content changes. Compare like-formatted versions and the diff shows you what actually matters.
Reading the colours correctly
The convention is consistent and worth internalising: red marks the original (removed) side and green marks the new (added) side. A changed line shows as a red/green pair — the before and the after. Unchanged lines stay neutral as context, so you can see where in the document each change sits. When you have many changes scattered through a long file, the Previous change and Next change buttons are far faster than scrolling, and long unchanged stretches are folded away, because the neutral context between changes is exactly the part you do not need to read. The skill is to trust the colour: if a line is neutral, it did not change, and you can skip it entirely.
When diff is not the right comparison
A line-based diff answers "what lines differ", which is the right question for code, config, and structured text. It is the wrong question for a couple of cases. It does not give you a single similarity percentage; it shows you which lines and words differ, which is usually what you need to act on. And if you are comparing two versions of prose where the meaningful unit is the sentence or the paragraph rather than the line, a line diff can be noisy, because re-wrapped paragraphs shift every line. For its home territory, though — finding the exact, precise differences between two versions of structured text — a diff is the tool that turns an unreliable manual hunt into a certain, glanceable answer.
Also try
Related tools that work well with this one: