4629 · Developer Tools · v1.0.0

Diff Lab

Two versions. One clear explanation.

Compare text by line, word or character. Read unified patches or accessible side-by-side originals with explicitly marked additions and deletions.

Two glass panels of light bars side by side, with differing rows highlighted green and red
AI-generated conceptual artwork; not an application screenshot.
Processed locally in your browser

Text-only workspace. Never executes input. General limit: 200,000 UTF-16 units per editor; some operations have tighter limits.

Private session · history disabled

Opt in to store up to five recent text transformations on this device. Never stored on an account or synchronized. Files are never included. Disable history stops new saves; Clear history deletes saved items.

How to use Diff Lab

Paste input, select a command and its options, then run the transformation. Review diagnostics before copying or downloading the result. Input is not executed.

Comparison preserves whitespace and is textual, not proof that two programs are equivalent. Inputs are limited to 20,000 UTF-16 code units each, and computation is terminated if it exceeds the worker time limit. A plus or minus label identifies every change without relying on color alone.

Privacy and boundaries

Editor contents stay in your browser. Transformations run in a disposable worker and are never sent to a formatting or AI service. History starts disabled; enabling it writes text to local browser storage only. Clearing that history removes this tool’s saved entries, not data saved by other applications. The surrounding website may load its normal navigation and analytics, but the utility workspace is excluded from content-interaction capture.

Use the labeled operation selector for the available capabilities. Keyboard users can reach every control with Tab; Ctrl or Command plus K opens the command palette. Copy requires clipboard permission. Download creates a local text file. Clear removes the current workspace; it does not automatically delete an opted-in history. Inputs and outputs are always rendered as text, never as a runnable preview.

What is a unified diff?

A unified diff is a textual patch with context and signed addition/deletion lines, making changes portable and reviewable.

FIELD GUIDE · PURPOSE AND BOUNDARIES

Diff Lab: practical use and context

Diff Lab compares two versions of text for reviewers, developers and editors. It makes additions and deletions explicit while preserving the distinction between a textual change and a change in meaning.

↑ Back to the application
Two glass panels of light bars side by side, with differing rows highlighted green and red
Application artwork reused from its publication image family. The interactive interface is above.

Keep the direction of the comparison explicit

Place the original in the first editor and the revised version in the second. Select line, word or character comparison according to the question you are asking. Lines are useful for configuration reviews; words help with prose; characters expose a small identifier or punctuation change. Choose inline or side-by-side presentation without changing which version is the original.

Run Compare and read the signed additions and deletions, not just their colors. For a portable record, choose Unified patch. A patch records context and changes; it is not a backup of an entire project and does not know whether the receiving repository has since changed. Review the surrounding lines before applying any downloaded or copied patch elsewhere.

A small change with a clear result

Use the paired examples that change the answer constant while leaving the console line unchanged. Compare by line, then by character. The first view identifies the changed statement; the second pinpoints the changed digits. This is a controlled demonstration of comparison granularity, not evidence that either program computes the right answer.

For an editorial use case, compare an original paragraph with a copy edited for clarity. Inspect whether meaning-bearing words disappeared along with repeated whitespace. The tool highlights characters, but a person still needs to assess factual accuracy, tone, permissions and whether the revision satisfies the intended brief.

Textual evidence, not semantic equivalence

Whitespace remains significant in the comparison. Two differently formatted JSON documents may contain the same values while producing a large text diff. Conversely, a one-character source change can alter program behavior dramatically. Use JSON Lab for structured JSON comparison, and run the consuming program’s tests when behavior matters.

The documented input and computation limits keep expensive comparisons bounded. A timeout is not a claim that the texts are equal or different; reduce the sample and retry a focused section. Long generated files are better reviewed as smaller logical units, while retaining an untouched original for reference.