Benchvale

Diff checker

A diff checker lines up two blocks of text and marks what was added and removed. This one compares them in your browser at line, word or character granularity, so neither version is uploaded. Unchanged blocks can collapse, you can jump to the next change, and the table says when it is showing only the first 200 rows.

Two versions

Everything here runs in your browser. We never send both versions to ourselves or anywhere else. It stays on your device. Once the page has loaded, you can disconnect and keep working.

Measured from the two versions
Added
·
Removed
·
Unchanged
·
Requests
· from Resource Timing
Script
· KB of a 100 KB budget
Everything here runs in your browser. We never send both versions to ourselves or anywhere else. It stays on your device. Once the page has loaded, you can disconnect and keep working. How we build tools

What a mark is, at each granularity

The rows are always line pairs, and the tally is always in changed lines. Granularity only changes the marks inside a changed pair. Line marks the whole line. Word extends each differing run out to whitespace-delimited tokens, so cat versus cot marks both words. Character marks the same runs without that extension, so only a and o light up.

Treat both sides as JSON is one checkbox: parse and sort keys together, or not at all. If a side does not parse, the checkbox stays on, a notice says key sorting is off, and the comparison still runs as plain text.

The table says when it is truncated

Collapse unchanged lines, on by default, keeps three lines of context around each change and replaces the rest with one gap row. After that, the table renders at most 200 rows. When there are more, the notice above the table names the uncapped row total. Copy as a diff and the added/removed tally still cover every line.

The engine lines the two sides up by longest common subsequence. It does not fall back to lining rows up by position, which is how a one-line insert used to read as every line changed. It also does not drop a __proto__ key, which is how two JSON documents that differed only there used to read as identical.

Share links carry both versions and every toggle in the URL fragment, after the #. Browsers do not send a fragment in a request, so the payload does not reach a server. Open a file reads a local text file into that side's box; a non-text type and a file over 5 MB each have their own error line, and the type check runs first.

Questions

Is either version uploaded?

No. Both blocks stay in this tab and the comparison happens here. Open a network tab and paste into both boxes: nothing is requested. Every release is checked by an automated test that fails the build if this page sends anything, described in how we build tools.

Can it diff two files rather than two pastes?

Yes. Open a file on each side reads the file in this tab. The picker accepts text files up to 5 MB. A non-text type is refused before size is checked, so a large image raises only the type error.

Why are there line, word and character views?

Because a line-only view hides a one-character fix inside a long line, and a character-only view is noisy when a whole token changed. The tally stays in changed lines in every mode so those two questions cannot be mixed up.

What does "ignore whitespace" actually ignore?

Leading and trailing spaces on each line, and runs of internal whitespace collapsed to one space. It does not ignore blank lines, which are still real lines unless you turn on Ignore blank lines. It is the right setting when comparing something that has been reindented and the wrong one when whitespace is the thing you are investigating.

Should I use this instead of git diff?

No. If both versions are in version control, use the tool that already knows their history. This is for the two things that are not in a repository: the payload in a support ticket and the one in your terminal.

Related tools

If both sides are JSON and you want the sorted document for something else, the JSON formatter does the same normalizing on its own. If one side needs decoding first, run it through base64 or URL decoding, or chain the whole sequence at the tool chain.

Maintained by Aaron Wilson
Published . Last updated . Method and formula: how we build tools. Something wrong? Tell us and it goes in the changelog.