Diff Checker: Compare Text Online
Compare two text blocks and highlight differences side-by-side
Examples
Replace one line and append another
Original:
alpha
beta
gamma
Modified:
alpha
beta changed
gamma
delta alpha
- beta
+ beta changed
gamma
+ deltaThe line replacement is represented as a removal and an addition; the final line is a separate addition.
Ignore edge whitespace and case
Original:
Name: Ada
Role: Engineer
Modified:
name: ada
Role: Engineer name: ada
Role: EngineerWith Ignore whitespace enabled and Case sensitive disabled, both lines match; unchanged rows use the modified text in the copied diff.
About this tool
This tool compares two texts line by line and reports what changed: lines only in the original are removed, lines only in the modified text are added, and rewritten pairs show as modified. A longest-common-subsequence pass aligns the versions like a version-control diff, computed entirely in your browser.
Two views cover both habits: Side by Side sets the texts in separate numbered columns, while the unified view stacks changes in one column behind +, - and ~ markers like a git patch. Inside modified line pairs the exact differing words are highlighted, so a one-word edit stands out.
Exports fit the next step: unified patch text, JSON with one record per line, or a colour-coded HTML table — each copyable or downloadable, plus a share link packing both texts into the URL. To turn a diff into a git patch file, continue with the Code Diff Patch Generator.
How to use this tool
Paste both versions
Put the original text in the first field and the modified one in the second; the diff updates as you type.
Tune the comparison
Switch on Ignore whitespace or turn off case sensitivity when formatting changes are not real edits.
Review the changes
Flip between Side by Side and Unified views, and enable word wrap for long lines.
Export or share
Copy or download the result as unified text, JSON or HTML, or create a share link carrying both texts.
Use cases
Reviewing configuration edits
Spot changed values and newly added settings between two versions of a line-oriented configuration file.
Comparing generated text
Check whether a template, report, or code generator changed its output between runs.
Verifying copy revisions
Identify added, removed, and replaced lines in documentation, release notes, or other prose.
Preparing a shareable text diff
Copy or download a compact marker-prefixed result for a review comment or debugging record.
Comparison options and outputs
| Option | What it does |
|---|---|
| Ignore whitespace | Trims each line before comparing, so indentation stops marking lines as edited |
| Case sensitive | Turn off to treat Name and name as identical |
| Unified / JSON / HTML export | Patch-style text, one JSON record per line, or a colour-coded table |
Common mistakes
Mistake:Reviewing a noisy diff caused only by trailing spaces.
Fix:Enable Ignore whitespace to trim leading and trailing whitespace during matching. Remember that spacing inside a line is still compared.
Mistake:Comparing CRLF text with LF text and interpreting carriage-return differences as content changes.
Fix:Normalize line endings before comparison, or enable Ignore whitespace so a trailing carriage return is removed by trim during matching.
Mistake:Expecting a word-level highlight inside a changed sentence.
Fix:This tool is line-based only. A changed line is shown as a removed line plus an added line; use a word-diff tool when token-level changes are required.
Mistake:Turning off case sensitivity without considering whether capitalization is meaningful.
Fix:Leave Case sensitive enabled for source code, identifiers, and case-sensitive data. Disable it only when differently cased lines should be treated as equal.
Frequently asked questions
Can I compare two JSON or code files?
Yes. Input is treated as plain text lines, so JSON, YAML, configs and source code all work. The tool does not parse syntax, so formatting a JSON file first gives cleaner results when only the data changed.
Why does the diff show lines that look identical?
Usually invisible characters: trailing spaces, tabs versus spaces, or Windows CRLF endings against Unix LF. Enable Ignore whitespace to skip spacing differences; line endings stay part of the line, so a CRLF/LF mismatch still marks it.
Is there a size limit?
No hard limit is enforced, but comparison runs locally and its cost grows with the product of the two line counts. A few hundred lines compare instantly; many thousands get slower.
Is my text uploaded?
No — the diff is computed in browser JavaScript. The only output that leaves the page is a share link you explicitly create, which encodes both texts in its query string.
Related guides
References & standards
Related tools
Code Diff & Patch Generator
Generate and apply strict LCS-based unified diffs entirely in your browser.
JSON Formatter
Advanced JSON formatter with validation, analysis, search, multiple format modes, file upload, and comprehensive statistics.
Prompt Diff Comparator
Compare prompt versions and expected A/B outputs locally
Helm Values Diff & Merge
Deep-merge Helm chart values and compare added, changed, and deleted YAML paths