RevealTheme logo

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. 1

    Paste or type the original version into the left textarea labeled Original.

  2. 2

    Paste or type the changed version into the right textarea labeled Modified.

  3. 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. 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?
No. It compares whole lines, so a single changed word marks the entire line as a deletion plus an addition. For word- or character-level highlighting use a dedicated tool like Meld, Beyond Compare, or the diff view in VS Code.
Why does inserting one line make everything after it look changed?
The tool compares lines by position, not by content. Inserting a line shifts every following line to a new index, so each one no longer matches the line at the same position in the other text. A true diff (git, Myers, or LCS-based) avoids this; this simple version does not.
Is my text uploaded anywhere?
No. The entire comparison runs locally in your browser using JavaScript. Nothing you paste is sent to a server, stored, or logged.
Is the comparison case- and whitespace-sensitive?
Yes. Lines must match exactly to count as unchanged. Different capitalization, trailing spaces, or tabs versus spaces all register as changes.
Is there a size limit?
There is no hard cap, but because everything runs in the browser and rerenders on each keystroke, very large inputs (many thousands of lines) may feel slow. For large files use a desktop diff tool.
Can I diff two files by uploading them?
Not directly. There is no file picker; you paste text into the two boxes. Open each file, copy its contents, and paste it into the Original and Modified fields.
Does it understand code syntax or formatting?
No. It treats input as plain text lines and does not parse any language, so it will not ignore reformatting, reordering, or semantically equivalent changes. It only reports literal line differences.

Related tools