Text Diff Checker — Compare Two Texts Line by Line
Paste the original and the modified version, press Compare, and see exactly which lines were added or removed — without committing anything to Git first.
How the comparison works
The tool computes an exact, line-based diff using a longest-common-subsequence table, the same family of algorithm behind git diff and diff -u. Lines present only in the modified text are marked + (green), lines present only in the original are marked - (red), and shared lines are shown unmarked. A line you edited appears as one removed line followed by one added line; there is no character-level highlighting.
When a visual diff beats eyeballing
Two 200-line configuration files that “look the same” almost never are. A diff immediately reveals the single changed timeout, the reordered environment variable or the trailing whitespace that broke a YAML parse. It is equally useful for comparing API responses from two environments, two versions of a legal clause, or the output of a script before and after a refactor.
Getting cleaner results
Normalise before you compare: format both JSON documents with the JSON Formatter, sort both lists with the Sort Lines tool, or convert both to the same line endings. The comparison is exact, so there is no ignore-whitespace option: if indentation changed but logic did not, normalise the indentation first. For structured JSON where key order is irrelevant, the JSON Compare tool understands objects rather than lines.
How to use it
- Paste the original text into the Original box and the new version into Modified.
- Press Compare (the result does not update as you type). Read additions (green
+) and removals (red-); the counters above show Added, Removed and Unchanged lines. - Copy what you need from the result for a ticket or review comment.
Example
Original vs. modified .env file:
- DB_POOL_SIZE=10 + DB_POOL_SIZE=25 CACHE_TTL=300 - FEATURE_FLAGS=search,export + FEATURE_FLAGS=search,export,billing + SENTRY_DSN=https://…
Three substantive changes are visible at a glance — a larger pool, a changed feature flag line and a new variable — while the unchanged CACHE_TTL line provides context. Because the comparison is line-based, each edited line shows as one removed plus one added line.
Common use cases
- Reviewing a configuration change pasted into a chat or ticket before approving it.
- Comparing API responses from staging and production to find a data discrepancy.
- Checking what an auto-formatter or code generator actually changed.
- Spotting edits between two versions of a contract, policy or documentation page.
What the tool really shows
Press Compare to run the diff; it does not update as you type. The output lists every line with a marker: + for a line that exists only in the Modified box (green), - for a line only in the Original (red), and an indented, unmarked line for text that is the same in both. Above the result you get counts for Added, Removed and Unchanged lines.
The comparison is exact and line-based. There is no ignore-whitespace or ignore-case option, no side-by-side view and no character-level highlighting. A line you edited therefore appears as one removed line followed by one added line, not as a paired change.
Worked example
Original:
host=db1 port=5432 pool=10 debug=false
Modified:
host=db1 port=5432 pool=50 debug=false flag=on
The result shows host and port unchanged, - pool=10, + pool=50, debug=false unchanged and + flag=on. The counters read Added +2, Removed -1, Unchanged 3.
Why identical-looking lines differ
Because matching is exact, anything invisible counts: a trailing space, a tab instead of spaces, a non-breaking space, or a different line ending. If a diff reports many changed lines that look identical, normalise the text first. Trim each line with the Sort Lines tool's Trim Whitespace button, or retype the suspect line. When the line order is irrelevant, sort both lists with Sort Lines before comparing so that only real content differences remain.
Size
The tool builds a table with one cell for every pair of lines, so memory use grows with the product of the two line counts. A few thousand lines each is comfortable; for huge files use diff or git diff on the command line.
Frequently asked questions
Is there a size limit?
The tool builds a table with one cell for every pair of lines, so memory grows with the product of the two line counts. A few thousand lines each is comfortable; for huge files use diff or git diff on the command line.
Can I ignore case or whitespace differences?
No. The comparison is exact. To ignore case, convert both texts to lower case with the Case Converter first; to ignore indentation, normalise it before comparing.
Does it compare files or only pasted text?
Paste the contents of each file. Nothing is uploaded, so there is no file picker that sends data to a server.
Why are two identical-looking lines marked as different?
Usually invisible characters: a trailing space, a tab vs. spaces, a non-breaking space, or CRLF vs. LF line endings. The tool does not highlight them, so retype or normalise the suspect line.
Can it compare two files directly?
No. Paste the contents of each file into the two boxes. Nothing is uploaded.