Paste Original text on the left and Modified text on the right to compute a minimal Longest Common Subsequence (LCS) line diff, toggle Side-by-Side or Unified patch output, ignore whitespace or case noise, and export a standard .diff file.
Comparing staging versus production .env files, Nginx virtual host blocks, or hotfix snippets outside Git often tempts engineers to paste secrets into public diff websites—risking accidental permalink leaks or server logging.
This line-level diff engine runs a deterministic Longest Common Subsequence (LCS) algorithm strictly inside your browser tab, rendering paired line numbers in Side-by-Side mode or git-compatible +/- hunks in Unified mode with instant addition and deletion counters.
Code & Config Comparison Pitfalls
01. CRLF vs LF Line Ending False Diffs
Files edited on Windows (\r\n) compared against Linux copies (\n) flag every single line as modified in raw byte comparisons. Normalizing CRLF before diffing isolates real content edits.
02. Trailing Spaces & Indentation Reformatting Hiding Logic Bugs
When one snippet was auto-formatted with Prettier or copied through Slack, indentation noise buries an actual timeout or port change. Toggle Ignore Whitespace to expose semantic edits immediately.
03. Using Line Diff on Reordered JSON Objects
If two API responses contain identical fields in shuffled order, line diff marks almost every line changed. Switch to MoriDev JSON Diff for order-independent structural comparison.
Diff Views & Matching Options
| Option / View | Behavior | Best Used For |
|---|---|---|
| Side-by-Side | Aligned left/right columns with dual line numbers | Visual review of configs, SQL, and PR patches |
| Unified Patch | Single stream with --- / +++ headers and +/- prefixes | Copying patch snippets into PRs or bug reports |
| Ignore Whitespace | Collapses indentation and leading/trailing spaces | Spotting logic edits across reformatted code |
| Ignore Case | Case-insensitive line matching | Comparing SQL logs or DNS/environment exports |
Worked Engineering Examples
Auditing an Nginx TLS Hardening Diff
Load Sample: an 8-line HTTP server block vs its 10-line TLS replacement
2 removed (-), 4 added (+), 6 unchanged lines
Pinpoints exact inserted security headers and altered listen directives without leaving your browser.
Exporting a Shareable Unified .diff Patch
Toggle Unified View -> Click Download
--- original\n+++ modified\n@@ -1,8 +1,10 @@\n...
Generates clean git-style unified diff output ready for issue trackers or incident postmortems.
Frequently Asked Questions
Is it safe to diff production .env files containing API secrets here?
Yes. Neither input pane is persisted to a backend, sent over the network, or assigned a public share URL—everything stays strictly in local tab memory.
What algorithm powers the line alignment?
It computes an exact Longest Common Subsequence (LCS) dynamic programming table for standard code/config sizes to minimize spurious deletions and insertions. Only when both sides change thousands of lines is the block shown as one full replacement.
What is the difference between Swap and Clear?
Swap flips Original and Modified panes instantly (inverting additions into deletions), while Clear resets both editors.
Why should I use JSON Diff instead of Text Diff for API payloads?
Text Diff compares raw lines sequentially, so reordered JSON keys appear changed. JSON Diff parses both objects and compares values semantically regardless of key order.