Text Compare_
Paste two texts and get an answer, not just colors: identical, differing only in line endings, whitespace, or letter case — or exactly which lines changed, with the changed words highlighted inside them. Ignore-whitespace and ignore-case toggles separate real edits from formatting noise.
The comparison runs live in this tab. What people compare — contracts, offer letters, essays, config files — is exactly what shouldn't travel: the leading compare sites store saved and shared diffs on their servers, and their own terms warn against sensitive content. This page cannot upload anything, and works offline.
A text compare tool that gives a verdict, not just colors
What comparing two texts actually answers
When you compare 2 texts, the real question is usually binary — is this the version I think it is? — and only then "what changed". So this text compare tool leads with a verdict: identical, differ only in line endings, only in whitespace, only in letter case, or N changed lines with the breakdown. The colored view answers the second half: removed lines in red, added in green, and edited lines paired with their changed words highlighted, so a one-word edit reads as a one-word edit rather than two unrelated lines.
How the difference is found
The engine finds the longest sequence of lines the two texts share and treats everything off that spine as added or removed — the same family of algorithm behind git diff. Where a removed line sits directly against an added one, they're paired as an edit and diffed again at word level, which is what produces the inner highlights. The ignore toggles change only the comparison, never the display: with "Ignore whitespace" on, hello world and hello world count as the same line, but you still see your original text.
Why two identical-looking texts can differ
The most confusing comparison result is "different" on two texts that look the same. The culprits are invisible: Windows line endings (\r\n) against Unix (\n), trailing spaces a text editor left behind, non-breaking spaces pasted from a web page, curly "smart" quotes swapped in by a word processor, or zero-width characters that survive copy-paste. Instead of flagging forty lines and letting you hunt, the verdict names the class — only line endings, only whitespace — and the reference table below lists where each invisible character sneaks in from.
Confidential text and server-side compare tools
Think about what gets pasted into a compare tool: two versions of a contract, an offer letter against the promised terms, unpublished writing, configs with credentials inline. The market leader's save-and-share flow stores diffs on its servers — its own terms tell you not to submit confidential or sensitive information, and the private option it offers is a paid desktop app. This page is the desktop-app model for free, in the tab: the security policy forbids the tool from making network requests, the test suite asserts none happen, and there is deliberately no share link — a share link is an upload. For the full developer diff view (side-by-side panes, line numbers, patch output), the dedicated diff checker page in the registry covers it as it goes live.
How to use
- 01Paste the two texts — or Upload a file into either pane. The two text compare runs live as you type, and the verdict line updates first: identical, an invisible-only difference, or a count of changed lines.
- 02Read the result view: red lines were removed, green were added, and paired edits highlight the exact words that changed inside the line. Reflowed prose pairs up line by line, so a rewrapped paragraph reads as edits, not wholesale deletion.
- 03Use the toggles to silence formatting noise: Ignore whitespace for re-indented config or trailing spaces, Ignore case for prose and case-insensitive identifiers. Swap exchanges the panes when you pasted them backwards.
- 04Copy or download the report — a unified, git-style summary of the changes with context lines. Everything in this text compare tool stays in your browser, so confidential drafts are safe to check.
Four comparisons people actually run
Two drafts of the same paragraph
Which words did the editor actually change? Paired lines highlight the edits inside the sentence instead of flagging the whole paragraph.
A: The quick brown fox jumps over the lazy dog. B: The quick red fox leaps over the lazy dog.
✗ 1 changed line: 1 modified − The quick [brown] fox [jumps] over the lazy dog. + The quick [red] fox [leaps] over the lazy dog.
Config before and after deploy
Re-indentation drowns the one real change. Ignore whitespace silences it, and the verdict confirms whether anything real moved.
Ignore whitespace: ON
✓ Identical with the current ignore options (whitespace ignored).
The email that “didn't change”
Legal sent back “the same” offer letter. The verdict says otherwise — and names the one line that moved.
✗ 1 changed line: 1 modified
− Severance equals [six] months of base salary. + Severance equals [three] months of base salary.
Pasted spreadsheet columns
Two exported ID lists that should match. Every line is compared in order; additions and removals get their own rows and the count says how far off you are.
A: 1041 1042 1043 B: 1041 1043
✗ 1 changed line: 1 removed − 1042
Comparison scenarios → settings
| You are comparing | Toggles | What the verdict tells you |
|---|---|---|
| Two drafts of an essay or article | none | Modified pairs with word highlights are your edit list; added/removed lines are new or cut sentences |
| Config files before/after a change | Ignore whitespace | Real key or value changes only — re-indentation and trailing spaces stop counting |
| Translated / localized strings | none | Every line should be modified; an added or removed row means the files fell out of sync |
| Spreadsheet columns pasted as text | Ignore whitespace | Added/removed rows are the mismatched entries; “identical” means the exports agree |
| Code snippets from two sources | Ignore whitespace + case as needed | “Differ only in whitespace” usually means formatting, not behavior — but check indentation-sensitive languages by hand |
| A file after mail/CMS round-trip | none first | “Only line endings” or “only whitespace” verdicts mean the transport rewrapped it — content survived |
Start with both toggles off: the verdict will tell you when the only differences are ones a toggle would hide, which is itself the answer.
Invisible differences that break “identical”
| Character / class | Where it sneaks in | How it shows here |
|---|---|---|
| CRLF vs LF line endings | Windows vs Unix tools, git autocrlf, email clients | Verdict: “differ only in line endings (CRLF vs LF)” |
| Trailing spaces / tabs | Editors, copy-paste from terminals | Verdict: “differ only in whitespace”; Ignore whitespace equalizes |
| Non-breaking space (U+00A0) | Copy-paste from web pages and Word | Whitespace-class difference — collapsed by Ignore whitespace |
| Smart quotes “ ” vs straight " " | Word processors, CMS autocorrect | A real character change — shows as a modified pair with the quote highlighted |
| Zero-width space / joiner (U+200B, U+200D) | Web copy, emoji sequences, some CMSes | A real (invisible) change — the modified pair looks identical; trust the verdict |
| Tabs vs spaces indentation | Editor settings, YAML/Makefiles | Whitespace-class — but semantically meaningful in YAML and Makefiles; don’t ignore blindly there |
If a modified pair looks identical on screen, the difference is one of these. Copy the report — the unified output preserves the exact bytes of both lines.
Tips & best practices
- Read the verdict before the colors — “differ only in whitespace” answers most comparisons in one line and tells you no content changed.
- Comparing JSON? Format both sides with sorted keys first (the JSON formatter does it) so key order stops producing false differences.
- Reflowed prose looks worse than it is: rewrapping moves every line boundary. Paired word highlights recover the real edits — look at what’s highlighted, not how many lines are tinted.
- For legal or HR documents, compare locally by principle: this page can’t upload your text, and no share feature exists to accidentally publish it.
- Swap fixes the classic mistake of pasting the new version on the left — added and removed are directional.
- The downloaded report is a git-style unified diff — it pastes cleanly into a ticket or review comment, and preserves the invisible characters your eyes can’t see.
Gotchas — where comparisons mislead
Invisible characters make liars of your eyes
Two texts can render identically and still differ — non-breaking spaces, zero-width characters, smart quotes, line endings. When the verdict says “different” but you can’t see it, the invisible-differences table above is the suspect list, and the downloadable report carries the exact bytes.
Reflowed prose inflates the diff
Rewrap a paragraph at a different width and every line changes even though no word did. Line-based comparison flags them all; the word-level highlights inside paired lines show whether anything real changed. For heavily reflowed text, compare with Ignore whitespace on.
Whitespace is not always noise
Ignore whitespace is right for prose and most configs — and wrong for YAML, Makefiles, and Python, where indentation is meaning. If the verdict says “only whitespace” for those files, that may be exactly the bug.
Server-side compare tools see your documents
Saved and shared diffs on the big compare sites live on their servers — the market leader’s terms warn against submitting sensitive information, and its private mode is a paid desktop product. Confidential text deserves a tool that provably cannot upload it.
Order matters
Added means “in the right pane, not the left”. If the report reads backwards — everything you wrote seems deleted — the panes are reversed; Swap fixes it in one click.
Technical details
- Verdicts
- Identical · line endings only (CRLF/CR vs LF) · whitespace only · letter case only · both · N changed lines with modified/added/removed counts
- Algorithm
- Line-level longest-common-subsequence (patience-style anchoring with an exact-DP core and a bounded fallback — pathological inputs cannot hang the tab); adjacent remove/add runs pair into edits with word-level LCS highlights
- Ignore options
- Whitespace (trim + collapse runs) and case — they normalize the comparison only; the display always shows your original text
- Report
- Unified, git-style diff with @@ hunk headers and 3 lines of context — Copy and Download (compare.diff)
- Limits
- 500,000 characters per side; the result view renders the first 2,000 rows with a note — the report always carries every change
- Word refinement
- Paired lines up to 2,000 characters get word-level highlights; longer pairs stay whole-line to keep the comparison instant
- File handling
- Upload reads both files locally via the File API; no save, no share link — by design
- Network use
- None during comparison — enforced by the security policy, asserted in tests, works offline
Frequently asked questions
Is it safe to compare confidential documents here?
Yes — the comparison is JavaScript in this tab, the security policy blocks the tool from making network requests, and the page works offline. There is deliberately no save or share feature: on the big compare sites those store your text server-side, and their own terms warn against sensitive content.
Why does it say the texts differ when they look identical?
An invisible difference: line endings (CRLF vs LF), trailing spaces, non-breaking spaces, smart quotes, or zero-width characters. The verdict names the class when it can, and the invisible-differences table lists where each one sneaks in.
What do the ignore toggles actually do?
They change how lines are compared, not what is displayed. Ignore whitespace trims each line and collapses runs of spaces and tabs; Ignore case compares lowercase. Your original text stays on screen either way.
Can I compare Word documents or PDFs?
Paste or upload their text content. This page compares plain text — formatting, images, and tracked changes are outside its scope. For .docx revisions, Word’s own compare keeps the formatting layer.
How large can the texts be?
Up to 500,000 characters per side — a few hundred pages of prose. Past that, the tool tells you rather than freezing; for huge files, a local git diff is the right instrument.
What’s the difference between this and a diff checker?
This page answers “are these the same, and where do they differ” with a verdict and an inline view built for prose. A diff checker is the developer instrument — side-by-side panes, line numbers, patch output. Both run on the same engine; the dedicated diff checker page ships next.