Diff Viewer

Compare left and right text with line-level and inline highlights.

Runs locally in your browser. No account required.

Practical usage guide

What this tool does

Diff Viewer compares two text blocks line by line and highlights changed portions within paired lines. The input uses a line containing only --- as the divider between the left and right versions, which keeps the tool usable in a single paste area.

The comparison is textual rather than language-aware. Whitespace, line endings, capitalization, and formatting changes all affect the result, even when two code snippets behave the same.

Quick start

Paste the original text first

Place the baseline or older version above the divider. Preserve meaningful blank lines and indentation.

Add a divider line

Insert a line that contains exactly three hyphens: ---. The first such line separates the two inputs.

Paste the revised text below

Run the comparison and review removed, added, and paired changed lines. Copy the textual result if you need a compact summary.

Common use cases

Compare configuration revisions

Find changed keys, values, and indentation before applying a small configuration update.

Review copy edits

Spot wording, punctuation, and line-break changes between two versions of a message or document fragment.

Inspect small code snippets

Compare a function, query, or command before and after an edit without uploading it to a remote diff service.

Limitations and important notes

The diff is not syntax-aware

It does not parse programming languages, ignore comments, or understand moved code. Reformatting may produce many changes.

Output is not a patch file

The result is intended for visual review and does not generate unified diff headers or a patch that can be applied by Git.

Large inputs can be expensive

The line comparison uses a longest-common-subsequence approach. Very large or highly different texts can consume noticeable browser time and memory.

Examples

Compare two snippets

Use --- as the divider between left and right text.

Frequently asked questions

How do I provide left and right input?

Put a line containing only --- between the left and right text blocks.

Related tools