Text Diff
Compare two texts line by line and see added and removed lines.
What is Text Diff
This text diff tool compares two text blocks line by line and marks added (+), removed (-) and unchanged lines. It uses the longest-common-subsequence (LCS) algorithm, so the result is the minimal meaningful change. Handy for comparing JSON or XML before and after formatting. Up to 500 lines per block; everything runs locally.
🔒 Everything runs in your browser. Nothing is uploaded.
What this tool actually does with your file
- Where it runs
- In your browser, on this page
- Upload
- None — the file never leaves your device
- Offline
- Works with the network disconnected
Line-based comparison, with a hard limit
The comparison aligns two blocks line by line, marks additions and removals, and shows unchanged context. Blocks above 500 lines are rejected rather than silently truncated, because a diff that quietly drops the tail reports "no differences" for a change it never looked at.
Line granularity is the important limitation. A single character edited inside a long line marks the whole line as changed, so the reader has to find the difference by eye. Word-level or character-level diff is a different algorithm and produces a much noisier output for large documents.
Whitespace and line endings
A file saved with CRLF compared against the same content with LF differs on every line. Trailing whitespace, a missing final newline and tabs versus spaces each produce a diff where nothing meaningful changed — this is the reason version control offers ignore-whitespace options.
Normalising before comparing is usually right for prose and wrong for code, where indentation is structure. The honest approach is to look at both views: normalised to see whether there is a real change, exact to see what the tool will report.
What a diff does not tell you
It shows what changed, not whether the change is correct. Two documents can differ in one character and have completely different meanings, or differ in a thousand lines of reformatting and be equivalent.
For anything that will be merged or reviewed, pair the diff with the reason for the change. A diff is evidence, and evidence without a hypothesis is just noise — which is why the most useful review comment is rarely on the changed line itself.
How to use
- 1.Paste the original text
- 2.Add a '---' line, then paste the new text
- 3.Run and review the diff
How this compares
There are three ways to do this conversion: in the browser (this page), through a server-side converter, or with a desktop app. The useful difference is not speed — it is where your file goes and how far the free tier actually reaches.
| Aspect | This tool | Upload-based converters | Desktop software |
|---|---|---|---|
| Where the file is processed | In your browser, on this page | On the vendor's servers, after an upload | On your own machine, after installing an app |
| Account required | No | Usually — free tiers ask you to sign in before lifting a limit | No, though a licence may be needed |
| Size you can process for free | No size cap, no run limit | A few files per hour, or a ~5–10 MB cap before a paywall | Whatever your disk and RAM allow |
| Price | Free. Pro is $9/month, and only buys larger files and AI features | Usually a subscription — roughly $7–15/month as of November 2026 | A one-off licence, or a subscription |
| Works offline | Yes, once the page has loaded | No | Yes |
| Time before work starts on a 20 MB file | Immediate — there is nothing to upload | Dominated by the upload — about 16 s on a 10 Mbps uplink | Just the app launch |
| What it cannot preserve | Checks run against what the URL returns now, not against a stored snapshot | The same — the conversion is the same maths | The same, though some desktop apps re-render styles more faithfully |
Server-side converters are genuinely better at some things: very large files, sharing results with a team, keeping a conversion history, and automating batches from a script. For the case in front of you — one file, one format change, right now — they mostly add an upload wait and a sign-up form.
Frequently asked questions
How do I separate the two texts?
By default with a line containing only ---. A blank-line separator is also selectable.
What is the size limit?
500 lines per block. Larger inputs are rejected to protect browser memory.
What this kind of conversion cannot keep
Developer tools here check what breaks silently: a missing canonical, a description over the length search engines display, a sitemap that returns 200 but lists dead URLs. Each result links to the exact line or URL, because a warning you cannot act on is noise.
More in Developer
On this page
- What is Text Diff
- What it does with your file
- How it actually behaves
- How to use it
- How this compares
- FAQ
Excel formula reference
29 functions with syntax, arguments and a table you can retype.
Browse the list →