Diff · macOS

Nothing leaves your Mac. Same or different — and where.

An image you can’t share, a 10-million-line log, a contract PDF. One command answers on your machine alone. Unless you hand it a URL, not a single byte leaves.

brew install mr-tabata/tap/mrdiff

Free forever · CLI / $29 One-time · up to 2 Macs per license

$ mrdiff app-09-12.log app-09-13.log
# 780 MB, 10,000,000 lines — 0.7 s
2 changed, 0 added, 0 removed
4999997   - 09:08:19 INFO  GET /api/items/3523 status=200
4999997 + 09:08:19 INFO  GET /api/items/3523 status=500

$ mrdiff before.png after.png
Images differ — 12,481 of 390,000 pixels (3.2%)

Features

Images: same or not, what share of pixels, where first

PNG, JPEG, HEIC, WebP, TIFF, PSD, camera RAW — anything the OS ImageIO can read. It counts pixels, so a one-pixel difference never rounds to “0.0%”. Loosen it with --tolerance and the output says so.

$ mrdiff before.png after.png
Images differ — 12,481 of 390,000 pixels (3.2%)
First difference at (412, 88)
largest per-channel gap: 41 — --tolerance=41 would call these the same

PDFs: which page, and where on the paper

It answers in millimetres, not pixels. Pages are rendered and compared, so re-flowing the whole file for one fixed word still gives the answer proofreading needs. Add --text to see which lines of wording changed.

$ mrdiff proof-v1.pdf proof-v2.pdf
PDFs differ — 1 of 12 pages
p.7  2 regions
     top 107 mm, left 25 mm, 71 × 14 mm
     top 205 mm, left 106 mm, 21 × 21 mm

Binaries: how many regions, first offset

Adjacent bytes count as one region. When lengths differ, only the common part is compared and the remainder is reported as such, so a one-byte insertion doesn’t become “everything after is different”.

$ mrdiff firmware-v1.bin firmware-v2.bin
Binary files differ — 47 regions, first at 0x1A3F
158 of 2,000,000 bytes differ

JSON and YAML: as data, not lines

It says which key, value or array element changed, with the values. Key reordering doesn’t count, and an insertion in the middle of an array doesn’t turn everything after it into noise.

$ mrdiff config.json config-new.json
1 changed, 2 added, 0 removed
+ extra: "new"
+ items[3]: 4
~ version: "1.0" → "1.1"

Does the live site match its source folder?

--site fetches each git-tracked file from the site and reports what differs or is missing. “Did we forget to deploy this?” becomes a CI check.

$ mrdiff --site https://example.com ./site
changed   index.html
not on site   pricing.html
1 changed, 1 not deployed, 0 could not be checked

Over SSH, in both directions

--ssh compares a whole tree both ways, including files on the server that aren’t in the repo — old exports, forgotten backups. Authentication is your own ssh; it never asks for a password.

$ mrdiff --ssh ./site deploy@host:/var/www
changed   config/app.yml
only local (not deployed)   pages/new.html
only on remote (left over?)   backups/customers.sql
1 changed, 1 only local, 1 only on remote
Pro

See the bytes side by side

Two files in hex and text, changed bytes highlighted. Jump to any difference from the list, and show 8, 16 or 32 bytes per row.

MrkDiff Hex comparing two binary files in hex, changed bytes highlighted, with a difference list on the right
Pro

From the changed line to the changed character

Text is compared in two panes, with the changed range inside a line highlighted. Apply a chosen difference to either side (it is not a 3-way merge).

Two config files compared as text, with changed lines and the changed characters inside them highlighted
Pro

Images, side by side or overlaid

Compare two images side by side, as an onion-skin overlay, or by swiping between them. Differing pixels are marked, a tolerance slider ignores tiny shifts, and the difference list gives each position, size and pixel count.

Two images compared side by side, differing pixels marked, with positions and pixel counts listed on the right

Folders, archives, Word, fonts

Two folders: which files differ. zip / xlsx / pptx / EPUB: which files inside differ, without unpacking. Word: which paragraphs. Fonts: which glyphs.

Terraform and SQLite

State and plan files are compared per resource, not as one huge JSON, and secret values are only reported as “changed”. SQLite is compared by schema (tables, columns, indexes).

Built for pipelines

--exit-code exits 1 on a difference, and --json is for machines and never translated. Use it for screenshot regressions or “did the build output change?”

MrDiff handles every kind with one command

What it runs is decided by the content, not the extension. All of this is in the free MrDiff (MIT licensed).

Files

  • Text and source (character-level highlight)
  • JSON and YAML (structural diff)
  • Images (anything ImageIO reads)
  • PDFs (page and position in mm)
  • Binaries (region count and first offset)

Places

  • Two URLs (fetches both and compares)
  • Clipboard vs file or URL
  • A live site vs its git folder
  • A local directory vs a server over SSH
  • Two folders

Looking inside

  • Archives (zip, xlsx, pptx, EPUB, Sketch)
  • Word documents (per paragraph)
  • Fonts (OTF, TTF, TTC, per glyph)
  • Terraform state and plan (secrets hidden)
  • SQLite schema

As a tool

  • Exit code 1 on a difference (--exit-code)
  • Machine-readable --json
  • English output; MRDIFF_LANG=ja for Japanese
  • Shell completions (bash, zsh, fish)
  • No account, no telemetry

Pricing

MrDiff

Same or different — and where.

Free

Free forever · CLI

MIT License · Source on GitHub

  • Text, JSON, YAML, images, PDFs, binaries
  • URLs, sites, SSH, folders, archives
  • Word, fonts, Terraform, SQLite
  • Stays on your Mac; 0.7 s on a 10M-line log
  • Exit codes and --json for pipelines
  • Install with Homebrew
Download MrDiff

MrDiff vs. MrkDiff Hex

MrDiffMrkDiff Hex
Text, JSON and YAML diffs✓✓
Image and PDF diffs✓✓
Binary diff (summary)✓✓
URLs, sites, SSH, folders, archives✓—
Runs in the terminal (pipes, CI)✓—
A Mac app (a window to look at)—✓
Binaries side by side in hex—✓
Two-pane text compare, apply a difference—✓
Image overlay—✓
PriceFree$29 one-time

Start with the free MrDiff.

brew install mr-tabata/tap/mrdiff