Skip to content
| Marketplace
Sign in
Visual Studio Code>Other>DiffminNew to Visual Studio Code? Get it now.
Diffmin

Diffmin

abhibarkade

| (0) | Free
Compare API responses and JSON inside VS Code. No more diffchecker.com. Structural key-level JSON diff + git histogram algorithm.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

Diffmin — Diff Tool for VS Code

Stop switching to diffchecker.com to compare API responses and JSON payloads. Diffmin brings it into VS Code — structural key-level JSON diff, git histogram algorithm, any file size.

Version License: MIT


Features

Two diff engines

  • Text mode — uses git diff --histogram (git's best algorithm) for more readable, semantically meaningful hunks. Falls back to Myers diff if git is not installed.
  • JSON structural mode — deep key-level comparison that understands your data. Shows user.address.city: "NYC" → "SF" instead of raw line changes.

Works on any file size

Virtual scrolling renders only the visible rows — 500k-line files open instantly, scroll smoothly, and never freeze the webview.

Tight VS Code integration

  • Compare two files — select any two files in Explorer → right-click → Diffmin: Compare Selected Files
    • .json files → structural diff in Diffmin
    • Everything else → VS Code's native diff editor (syntax highlighting, minimap)
  • Diff with HEAD — right-click a file → Diffmin: Diff with HEAD
    • .json files → structural diff (HEAD vs working tree)
    • Everything else → VS Code's native git diff

Diff view features

Feature Description
Word highlights Changed words within a line are highlighted
Fold unchanged Unchanged regions collapse to save space
Jump nav ↑↓ Jump between change hunks
Changes only Hide unchanged lines entirely
In-diff search Ctrl/Cmd+F searches across the diff
Ignore whitespace Toggle whitespace-blind comparison
Sort JSON keys Normalise key order before diffing
Format JSON Pretty-print minified JSON before diffing
Swap sides Flip left ↔ right
Paste / Copy Clipboard buttons on each pane

Usage

Open the diff panel (manual paste)

  1. Ctrl+Shift+P → Diffmin: Open Diff Panel
  2. Paste or type content into both panes
  3. Click Compare

Compare two files from Explorer

  1. Hold Ctrl (or Cmd on Mac) and click two files in the Explorer sidebar
  2. Right-click → Diffmin: Compare Selected Files

Diff a file against git HEAD

  1. Right-click any file in Explorer → Diffmin: Diff with HEAD — or right-click the editor tab title

Commands

Command Description
Diffmin: Open Diff Panel Open the manual paste panel
Diffmin: Compare Selected Files Diff two Explorer-selected files
Diffmin: Diff with HEAD Diff a file against its git HEAD version

Requirements

  • VS Code ^1.85.0
  • Git (optional — used for --histogram algorithm and Diff with HEAD; falls back gracefully if not installed)

Extension Settings

No settings in v0.1. Planned for v0.2: configurable context lines, default diff algorithm, and font size override.


Development

Prerequisites

  • Node.js 20+
  • pnpm

Setup

pnpm install
pnpm run build       # one-off build
pnpm run watch       # watch mode
pnpm run lint        # TypeScript type-check
pnpm test            # run Jest test suite

Run in VS Code

Press F5 to launch the Extension Development Host with the extension loaded.

Packaging

pnpm run package     # produces diffmin-0.1.0.vsix

Project Structure

diffmin/
├── src/
│   ├── extension.ts          # activation, command registration
│   ├── panel.ts              # webview lifecycle, message passing
│   ├── messages.ts           # shared TypeScript types
│   └── diff/
│       ├── textDiff.ts       # jsdiff-based line differ (fallback + JSON pair mode)
│       ├── jsonDiff.ts       # structural JSON differ (microdiff)
│       └── gitDiff.ts        # git diff --no-index --histogram wrapper
├── webview/
│   ├── main.ts               # virtual-scroll renderer, toolbar, search
│   ├── main.css              # theme-aware styles
│   └── index.html
├── test-fixtures/            # sample files for manual testing
└── src/diff/__tests__/       # Jest unit tests

Known Limitations

  • Binary files — no detection; will show garbled text if selected accidentally
  • Non-UTF-8 files — assumes UTF-8 encoding
  • Syntax highlighting — not included; use VS Code's native diff for highlighted text files

Contributing

Pull requests are welcome. For significant changes, please open an issue first to discuss what you'd like to change.

  1. Fork the repository
  2. Create your feature branch (git checkout -b feat/my-feature)
  3. Commit your changes
  4. Open a pull request

Please make sure pnpm run lint and pnpm test pass before submitting.


License

MIT © Abhishek Barkade

  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2026 Microsoft