NV ToolkitFormat · Validate · Convert

Text Tools

Text Diff Checker

Paste two versions, see what changed — matching lines aligned, insertions and deletions highlighted, nothing uploaded anywhere.

In short

Compare two texts side by side and see every insertion, deletion and change highlighted inline. Free, instant, and entirely private in your browser.

By NaveenKumar T · Updated

Learn: Regular Expressions Explained: A Practical Cheat Sheet With Tested Examples

  • Side-by-side aligned panes
  • Inline highlighting of changes
  • Works on any plain text

Runs entirely in your browser — nothing you paste or open here is uploaded, logged, or stored.How we handle data →

Learn more

What a diff actually does

Comparing two texts by eye fails for a specific reason: humans are good at spotting that something changed and bad at spotting that nothing did. Twenty identical lines followed by one altered digit is exactly the shape of problem our attention is worst at. A diff inverts the task — it aligns the two documents so that everything identical lines up and falls away visually, and only the differences are left to look at.

The alignment is the interesting part. A naive comparison walks both sides line by line, so inserting a single line at the top makes every subsequent line appear changed. A real diff algorithm finds the longest common subsequence of the two documents first — the same O(ND) difference algorithm Eugene Myers published in 1986, which is still the basis for the diff engine in Git, VS Code and most modern editors — then reports the insertions and deletions needed to turn one into the other. That is why adding a paragraph to the middle of a document shows up as one added block rather than as a cascade of shifted lines, and it is the difference between a diff you can read and a wall of red and green.

This page uses the same diff engine that powers VS Code's side-by-side comparison view, which means the behaviour is one you already know: matching lines aligned across the two panes, added lines marked on the right, removed lines on the left, modified lines shown on both with the changed characters highlighted inside them, and unchanged regions foldable so a long document collapses to its interesting parts. Both panes stay editable, so the tool doubles as a scratch space — fix the difference on the spot and watch the highlighting disappear.

The comparisons people actually run

Configuration drift is the commonest. Staging works and production does not, and the answer is somewhere in two nearly identical environment files or two copies of a service config. Paste both, and the six lines that differ separate themselves from the two hundred that do not. The same shape of question comes up between two servers' output, two versions of a deployment manifest, and a template against the file that was generated from it.

Log comparison is the second. A request that succeeded and one that failed produce two log extracts that are 95% identical, and the 5% is the bug. Diffing them beats reading them. So does comparing a captured HTTP header block against a working one, or two runs of the same script's output where one produced the wrong number.

Then there is text as text. Two drafts of a document where you need to know what an editor changed. A licence header that must be byte-identical across a hundred files. Two versions of a prompt, where a single word changed the model's behaviour and you would like to know which. A CSV export from before and after a migration. Two SQL queries that are supposed to be equivalent. In every one of those cases the alternative is reading both versions carefully, which takes ten minutes and misses things; the diff takes ten seconds and does not.

A tip for noisy diffs: if the two sides differ mostly in formatting rather than content, normalize first and compare second. The String Utility will trim trailing whitespace, collapse runs of spaces, or sort lines, any of which can turn an unreadable diff into a two-line one. For JSON, sorting both documents' keys before comparing has the same effect, and JSON Compare is the better page for that content anyway.

Normalize before you compare

Most unreadable diffs are not caused by the content differing — they are caused by the presentation differing, and a diff cannot tell the two apart. Four causes account for nearly all of it, and each has a one-step fix worth applying before you look at the result.

Common sources of diff noise and how to remove them
SymptomCauseFix before comparing
Every single line differsOne file uses CRLF line endings, the other LFConvert both to the same endings in your editor
Lines look identical but are marked changedTrailing spaces or tabs versus spacesTrim each line with the String Utility
Whole blocks movedContent reordered rather than editedSort lines on both sides if order is not meaningful
A one-line change shows as a whole-file changeOne side was reformatted or minifiedFormat both sides with the matching formatter first
Numbers differ everywhereTimestamps, ids or hashes regenerated per runRead past them; they are not the difference you want

Help

Frequently asked questions

Everything you need to know about the Text Diff.

01How do I compare two texts?

Paste the original into the left pane and the new version into the right — or load a file into either side, or drop one on it. The comparison runs as you type: matching lines are aligned across the two panes and every insertion, deletion and modification is highlighted, with unchanged regions collapsible so long documents stay navigable. Both panes stay editable, so you can fix something and watch the highlighting update.

02Is my text uploaded anywhere?

No. The diff is computed by the editor in your browser tab; neither side is transmitted, stored or logged, and the page keeps working after you disconnect from the network. That matters here more than on most pages, because the things people diff — environment files, log extracts, config with hostnames in it, unpublished drafts — are exactly the things that should not be pasted into a server-backed site.

03Does it show word-level changes or only whole lines?

Both. The alignment is line-based, which is what makes two versions of a document line up sensibly, but within a line that changed, the specific characters that differ are highlighted too. That distinction is what tells you at a glance whether a line was rewritten or whether one digit in it moved.

04How large a document can I compare?

Comfortably into the multi-megabyte range — the limit is your device's memory rather than any server quota, because there is no server. Diffing is inherently more expensive than formatting, so two very large files with almost nothing in common are the slow case; two large files that mostly match are fast, since matching regions are cheap to align.

05When should I use a different diff tool on this site?

When the content has a format worth highlighting. [YAML Diff](/yaml-diff) and [XML Diff](/xml-diff) are the same comparison with YAML and XML syntax highlighting, which makes structural changes far easier to read, and [JSON Compare](/json-compare) does the same for JSON. Use this page for everything else: logs, environment variable lists, CSV rows, prose, licence headers, SQL, prompts.

Keep working

Related tools

Learn the format

Related guides

All guides →