GitGudgit gud
gitgudRun an audit
‹ all tools
Inspectgitgud / tools

Diff Checker

Compare two texts line, word or character at a time — side-by-side or unified, with a JSON mode.

Runs entirely in your browser — nothing you paste is uploaded.

About Diff Checker

Two versions of a config file, two API responses, the log line before and after a deploy — comparing them by eye is how subtle differences survive. This does it properly: a real diff algorithm over both texts, rendered side-by-side or unified, with additions and deletions marked at whatever granularity you need.

Three modes. Line mode is the familiar one and what you want for code and config. Word mode is better for prose, where a reflowed paragraph would otherwise show up as every line changed. Character mode is for the cases where you're hunting a single wrong byte — a smart quote, a non-breaking space, a Cyrillic `а` in an identifier.

Ignore-whitespace strips the noise from re-indentation so you can see the change that actually happened. JSON mode goes further: it parses both sides and re-serialises them with sorted keys before diffing, so two documents that differ only in key order or indentation come back identical, and the differences you do see are real.

Everything runs in the tab, including on large inputs — five thousand lines a side renders in well under a fifth of a second. That matters more than it sounds, because the texts people most want to compare are the ones they can't paste into a website: production configs, customer records, unreleased copy.

Frequently asked

What is the difference between unified and side-by-side?

Side-by-side puts the two versions in parallel columns and is easier to read when changes are substitutions. Unified interleaves them with `+` and `-` markers, is compact, and is the format `git diff` and every patch file uses — so it's what you want if you're going to paste the result somewhere.

Why do two JSON documents show as completely different?

Almost always key order or indentation. Switch to JSON mode: it parses both sides and re-serialises them canonically before comparing, so only real differences in content survive.

Can it diff two files?

Paste their contents. There's no upload — which is the point, since the files people most want to compare are usually the ones they shouldn't send to a server.

How big an input can it handle?

Five thousand lines a side renders in under 200ms. Beyond roughly fifty thousand lines the diff algorithm's memory use starts to matter and the browser will slow down; at that size a local `diff` is the right tool.

Does ignore-whitespace ignore all whitespace?

It ignores leading and trailing whitespace and collapses runs of internal whitespace, so a re-indented block reads as unchanged. It does not ignore whitespace inside string literals, which would change meaning.

Related tools