What the result contains
What This Tool Provides
Compare two texts with a unified, line-by-line diff. Additions, removals, and unchanged lines are labeled with old/new line numbers, and optional comparison rules can ignore outer whitespace or letter case without rewriting the displayed text.
- Added, removed, and unchanged lines
- Old and new line numbers in unified output
- Added and removed totals
- Optional case and outer-whitespace comparison
How to Use This Tool
- Add both versionsPaste the original on the left and the changed text on the right.
- Choose comparison rulesOptionally ignore letter case or leading and trailing whitespace.
- Read the unified diffUse the line numbers and +/− markers to review changes.
How It Works
Both inputs normalize CRLF/CR to LF and split into lines. A longest-common-subsequence matrix aligns matching lines while preserving order. Lines found only in the original are removals; lines found only in the changed version are additions. A four-million-cell limit prevents large quadratic comparisons from exhausting the browser tab.
Worked Examples
Replace one line
- Input
Before: name=old After: name=new- Output
- name=old + name=new
A line-level comparison represents a changed line as one removal and one addition.
Ignore outer whitespace
- Input
Before: “ enabled=true” After: “enabled=true”- Output
Unchanged
With Ignore leading and trailing whitespace enabled, the comparison keys match while displayed text remains original.
Making a Diff Readable
Minified JSON diffs as one enormous line, which tells you nothing. Format both payloads first so the comparison happens field by field, and decode any Base64 so you are comparing content rather than ciphered-looking text.
Noise is worth removing before comparing: strip duplicate lines and normalize case so real changes stand out. When the only difference is a moving epoch timestamp, that is worth knowing too.
What Line-Based Comparison Means
The tool compares complete lines, not individual words or characters. A one-character edit therefore appears as a removed old line and added new line. This is useful for configurations, lists, drafts, and generated output, but it is not a Git merge engine.
Performance Boundary
The LCS algorithm grows with original lines × changed lines. The tool refuses comparisons above 4,000,000 matrix cells rather than freezing the tab. Compare smaller excerpts or use a dedicated source-control diff for large files.
Important Edge Cases
- Reordered lines usually appear as removals and additions.
- Repeated identical lines can have more than one valid alignment.
- Ignoring case or whitespace can hide differences that matter to code.
Limitations
- There is no word-level, character-level, merge, patch, or syntax-aware mode.
- The page does not load files directly or understand Git history.
- Large line combinations are rejected before allocating the comparison matrix.
Input handling
Private Browser Processing
Both versions are compared locally and are not sent to Tiny Tiny Tools.
Google Analytics records page visits and whether a tool finished or failed, but these tool implementations do not send field values, generated passwords, QR payloads, uploaded QR images, or camera frames to analytics or a Tiny Tiny Tools processing endpoint.
Safety note: HTML and script-like lines are created with textContent and displayed as ordinary text.
See the Privacy Policy for site-wide details.
Questions About This Tool
Is this a character-by-character diff?
No. It is line-based, so an edited line becomes a removal plus an addition.
Why are large texts rejected?
The alignment algorithm requires work proportional to both line counts multiplied together. The limit prevents an unresponsive tab.
Can it ignore whitespace?
It can ignore leading and trailing whitespace. Whitespace inside a line remains significant.
Does it modify either input?
No. Comparison normalization creates internal keys; the visible input and displayed line text remain unchanged.