onlinetools.dev

Text Diff Checker

Compare two texts line by line and see additions and deletions

Runs locally
loading…
About this tool

Paste an original text on the left and a changed version on the right, and get a unified line-by-line comparison: deletions marked in red, additions in green, context preserved in between, with original line numbers on both sides. It is the fastest way to answer "what actually changed?" between two configs, two API responses, or two versions of a snippet someone pasted in chat.

The comparison uses a longest-common-subsequence algorithm over lines, the same family of algorithm behind git diff, so reordered blocks and small edits produce a readable result rather than marking everything as changed. A summary line totals added and removed lines.

Because both texts stay in the page, diffing confidential material — contracts, credentials in configs, unreleased copy — carries none of the risk of pasting it into a random web service.

Frequently asked questions

Does the diff work on words or lines?
Lines. Each line is compared as a unit, which matches how developers read diffs of code and config. A changed line therefore shows as one deletion plus one addition; character-level inline highlighting is on the roadmap.
Why does my diff show everything as changed?
Usually invisible differences: one side uses tabs and the other spaces, Windows CRLF line endings versus Unix LF, or trailing whitespace. Normalizing whitespace before comparing (the JSON formatter with sorted keys helps for JSON payloads) makes the real changes visible.
Can I diff two JSON responses meaningfully?
Yes — format both through the JSON formatter with key sorting enabled first, so equivalent documents serialize identically. Then the diff shows genuine value changes instead of key-order noise.
Is there a maximum text size?
The algorithm compares every line of one text against every line of the other, so extremely large files (tens of thousands of lines on both sides) can take a moment. Typical code files and API payloads compare instantly.
Related tools