Text Diff Checker
Compare two blocks of text line by line and see additions, deletions, and unchanged lines color-coded. The comparison runs entirely in your browser.
How to use this tool
- 1
Paste or type the original version into the left textarea labeled Original.
- 2
Paste or type the changed version into the right textarea labeled Modified.
- 3
Read the result panel below: lines prefixed with a minus and shown in red were removed, lines prefixed with a plus and shown in green were added, and lines prefixed with an equals sign are unchanged.
- 4
Edit either box to refine your input; the diff recomputes instantly as you type.
How does this line-by-line diff actually work?
A diff compares two versions of text and reports what changed between them. This tool splits both inputs on newline characters and then compares the two lists position by position: line 1 against line 1, line 2 against line 2, and so on up to the length of the longer side. When two lines at the same position match exactly, the line is marked unchanged. When they differ, the original line is emitted as a deletion and the modified line as an addition. This is a naive positional comparison, not a true minimal-edit diff. It does not use the Myers or longest-common-subsequence algorithm that powers git diff, Meld, or VS Code, so it cannot detect that a block was inserted or moved. In practice that means inserting a single line near the top makes every line after it appear changed, because each line has shifted to a new index. The comparison is also case-sensitive and whitespace-sensitive: trailing spaces or a tab-versus-spaces difference count as a change. It is best for spotting edits in same-length, line-aligned text such as config keys, env files, or two pasted revisions of a paragraph.
Common use cases
Spot which keys changed between two versions of a .env or config file pasted side by side.
Compare two revisions of a short paragraph or email draft before sending the edited version.
Check what a teammate altered in a snippet they pasted into chat versus your local copy.
Verify that a find-and-replace did exactly what you intended across a block of text.
Review line-level differences between two SQL queries or log excerpts of similar length.
Confirm two lists (allowlists, redirect rules, CSV rows) are identical or see exactly where they diverge.
Frequently asked questions
Does this do a word-level or character-level diff?▼
Why does inserting one line make everything after it look changed?▼
Is my text uploaded anywhere?▼
Is the comparison case- and whitespace-sensitive?▼
Is there a size limit?▼
Can I diff two files by uploading them?▼
Does it understand code syntax or formatting?▼
Related tools
JWT Decoder
Decode JSON Web Tokens (JWT) instantly — inspect the header, payload, and signature claims. Runs entirely in your browser; tokens never leave your device. Safe for production secrets.
JSON Formatter & Validator
Format, validate, and minify JSON instantly. Catches syntax errors with line numbers, pretty-prints with adjustable indent, supports large payloads. Runs in your browser — no upload.
XML Formatter & Beautifier
Format and beautify XML documents — proper indentation, line breaks, namespace handling. Useful for SOAP responses, sitemaps, RSS feeds, and Android resource files.
Base64 Encoder & Decoder
Encode and decode Base64 strings.
URL Encoder & Decoder
Encode/decode URL-safe strings.
HTML Entity Encoder & Decoder
Convert special characters to/from HTML entities.