Text Diff Checker: Compare Text
Paste an original and a changed version, get a line-level diff with additions and removals highlighted. All local, nothing uploaded.
What this tool does
This text diff checker compares two blocks of text and shows you what changed between
them, line by line. Paste an original version on the left and a changed version on the
right, and it highlights removed lines with a red - gutter, added lines
with a green + gutter, and leaves unchanged lines neutral. A running
summary tells you how many additions and removals it found. It is the quickest way to
compare text online without pasting anything into a server, since the whole comparison
runs in your browser.
How to use it
Type or paste text into both boxes. The diff updates automatically a moment after you
stop typing, or you can click Compare to run it right away. Toggle
Ignore leading / trailing whitespace if you want to skip indentation
and trailing-space differences. For example, comparing
alpha / beta / gamma against
alpha / beta two / gamma keeps alpha and gamma
marked unchanged and reports the middle line as one removal plus one addition.
Common use cases
- Reviewing edits between two drafts of an email, article, or contract clause.
- Spotting what changed between two versions of a config file or environment list.
- Comparing log output or command results before and after a change.
- Checking a pasted code snippet against the version already in your editor.
- Confirming that a search-and-replace only touched the lines you expected.
Common pitfalls
- Edits show as a removal plus an addition. Changing any character in a line makes the old and new lines mismatch, so the tool lists the old line as removed and the new line as added. That is standard line-diff behavior; read the two rows together to see the before and after.
- Whitespace counts by default. A line that differs only in indentation or trailing spaces is treated as changed unless you turn on the ignore whitespace option. If reformatting is drowning out the real edits, enable it.
- It is a line diff, not a word diff. The unit of comparison is a whole line, so it will not highlight the single changed word inside a line. For a finer view, split long lines into shorter ones before comparing.
Frequently asked questions
- What is a text diff checker?
- A text diff checker compares two versions of a piece of text and shows you exactly what changed between them: which lines were added, which were removed, and which stayed the same. It is the same idea behind the diff view in code review tools and version control systems, applied to any plain text you paste in.
- How does this tool align the two versions?
- It uses a longest-common-subsequence (LCS) algorithm, the standard approach for line diffs. Rather than comparing line 1 to line 1 and line 2 to line 2, it finds the longest run of lines that appear in the same order in both versions and treats those as unchanged. Everything else is reported as an addition or a removal. This is why inserting a line in the middle does not shift every line after it into the changed column: the lines that follow stay aligned and are still marked unchanged.
- What does the ignore leading and trailing whitespace option do?
- When it is on, two lines that differ only in the spaces or tabs at their start or end are treated as identical, so reindentation and trailing-space edits do not clutter the diff. The comparison uses the trimmed text, but the output still shows the original line exactly as you pasted it. Turn it off when whitespace changes matter, for example in whitespace-sensitive formats.
- Why is a single edited line shown as one removal plus one addition?
- A line-level diff works on whole lines. If you change any character inside a line, the old line no longer matches the new one, so the tool reports the old text as a removal and the new text as an addition sitting next to each other. This is normal diff behavior; it lets you see both the before and the after without guessing which characters moved.
- Is my text uploaded or stored anywhere?
- No. The entire comparison runs in your browser with plain JavaScript. Nothing is sent to a server, logged, or saved. You can verify this by opening DevTools and watching the Network tab while you compare: there are zero requests. That makes it safe for drafts, contracts, config files, or anything you would rather not paste into a hosted service.
- How large a document can I compare?
- It is built for everyday text: a few hundred to a couple of thousand lines compares instantly. Because a full line diff compares every line on one side against every line on the other, extremely large inputs (many thousands of lines on both sides) are capped so the page stays responsive. For those, diff smaller sections at a time.
Cite this tool
For academic, journalistic, or technical references. Pick a format:
Citations use 2026 as the publication year. Access date is left as a fillable placeholder where the citation style expects one.