ruxox
Start
Start
Text / Diff

Text Diff Checker

Compare two blocks of text and see line-by-line differences highlighted. Useful for config files, API responses, and copy reviews. Browser only.

Text Diff Checker

Runs entirely in your browser — no server calls, no tracking.

🔒 Your data never leaves this tab. This tool has no backend.

About this tool

About the Text Diff Checker

A text diff checker compares two blocks of text line by line and highlights what was added, removed, or unchanged. It uses the LCS (Longest Common Subsequence) algorithm — the same algorithm behind git diff and Unix diff — to compute the minimal set of changes between the two inputs. Use it to compare API response versions, review config changes, spot differences in copy drafts, or verify that a refactor did not change output.

Reading the output

Lines in green prefixed with + are in the new text but not the original. Lines in red prefixed with - are in the original but not the new text. Unchanged lines are shown in grey for context. This is the unified diff format familiar from code review tools like GitHub and GitLab.

When to use a text diff vs git diff

Use git diff for code tracked in a repository — it has access to full history, commit context, and syntax highlighting. Use this browser tool when you have two text blobs that are not in version control: a before/after copy paste from a CMS, two configuration files from different environments, two versions of a JSON API response, or two AI prompt drafts you want to compare.

This tool performs line-by-line diffing. For word-level or character-level diffing (useful for spotting single changed words in long paragraphs), a more specialised tool is needed. The LCS algorithm here works well for structured text (code, config, Markdown) and line-oriented prose.

Diff notes

Reading a diff, and what the tools miss

A diff finds the smallest set of changes turning one text into another. Understanding how it decides that explains most surprising output.

GranularityBest for
Line diffCode, config, logs — the standard for version control
Word diffProse, contracts, copy edits
Character diffShort strings, IDs, spotting a typo

Line diffs are why a single reflowed paragraph can look like a wholesale rewrite: the algorithm sees the line changed, not that three words moved. For prose, compare at word level.

Invisible differences

The most frustrating case is two texts that look identical but do not match. Almost always one of:

  • Line endings — Windows uses CRLF, Unix and macOS use LF. Every line differs.
  • Trailing whitespace — invisible on screen, a real difference to the comparison.
  • Tabs versus spaces — identical alignment, different bytes.
  • Smart quotes and dashes — a word processor silently replaces " with and -- with an em dash.
  • Non-breaking spaces — pasted from a web page, they look like ordinary spaces.

The ignore whitespace option isolates real content changes when these are the noise.

Moved blocks

A standard diff has no concept of a move — a relocated paragraph shows as a deletion in one place and an addition in another. That is correct but unhelpful when reviewing a reorganised document, so read a large diff for what changed in each block rather than assuming everything flagged is new.

FAQ

Frequently asked questions

Why does my diff show changes when the text looks identical?

Usually an invisible difference: Windows CRLF versus Unix LF line endings, trailing whitespace, tabs instead of spaces, smart quotes substituted by a word processor, or non-breaking spaces pasted from a web page. Turn on ignore whitespace to isolate genuine content changes.

Should I compare by line, word or character?

Line diffs for code, configuration and logs — that is what version control uses. Word diffs for prose, contracts and copy edits, where a line diff makes one reflowed paragraph look completely rewritten. Character diffs for short strings, IDs and hunting a single typo.

Why does a moved paragraph show as deleted and added?

Because a standard diff algorithm has no concept of a move — it reports the smallest set of insertions and deletions, so relocated text appears twice. It is technically correct but unhelpful when reviewing a reorganised document.

Is it safe to compare confidential documents here?

Yes. The comparison runs entirely in your browser and neither text is uploaded, logged or stored. The page works with your connection disabled, which is worth verifying with any diff tool before pasting a contract into it.

How does the LCS algorithm work?
LCS (Longest Common Subsequence) finds the longest sequence of lines that appear in both texts in the same order, without requiring them to be contiguous. Lines not in the LCS are classified as additions or deletions. It produces the minimal edit distance between the two texts, which is why git diff and Unix diff use variants of it.
Can I compare files larger than a few paragraphs?
Yes — the tool processes the text in your browser with no size limit enforced server-side. Very large texts (thousands of lines) may be slower to compute because the LCS algorithm is O(n×m) in time and memory. For very large files, a local tool like diff or a code editor's built-in diff view will perform better.
Is this the same as git diff?
Same concept and same underlying algorithm, but git diff includes additional context: commit metadata, branch information, hunk headers (@@ -1,3 +1,3 @@), and syntax highlighting. This tool shows a simplified line-by-line diff suitable for comparing arbitrary text, not version-controlled source code.
Custom software

Need version control or content management built?

ruxox builds production web apps with proper change tracking, history, and comparison tooling built in.

Free project estimateNo obligation · reply in 48h
Get estimate