Skip to content
| Marketplace
Sign in
Visual Studio Code>Linters>JSON Formatter ProNew to Visual Studio Code? Get it now.
JSON Formatter Pro

JSON Formatter Pro

WhySubaru

|
1 install
| (0) | Free
A modern, fast, and beautiful JSON formatting, minifying, validating and statistics extension for VS Code.
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

JSON Formatter Pro

A modern, fast, and beautiful JSON toolkit for Visual Studio Code — format, minify, validate, and analyze JSON without leaving your editor.

Publisher: WhySubaru


✨ Features

Core

  • Pretty Format JSON — Format the current selection or the entire document, with 2-space, 4-space, or tab indentation. Unicode is preserved and large files are handled smoothly.
  • Minify JSON — Strip all insignificant whitespace with a single command, without changing the underlying data.
  • Validate JSON — Detects invalid JSON, jumps straight to the exact error location, and shows a friendly message with the precise line, column, and character position.
  • Copy Formatted JSON — Copies pretty-printed JSON straight to your clipboard with a confirmation notification.
  • Format From Clipboard — Reads JSON from your clipboard, formats it, and opens it in a brand-new untitled editor.

Bonus

  • ✅ Sort object keys alphabetically (recursively, arrays keep their order)
  • ✅ Escape a string into a JSON string literal
  • ✅ Unescape a JSON string literal back to raw text
  • ✅ Remove trailing commas from lenient/JSONC-like JSON
  • ✅ Detailed JSON statistics: total keys, objects, arrays, strings, numbers, booleans, nulls, total size, and max depth
  • ✅ Toggle indentation between 2 spaces, 4 spaces, and tabs

Interface

  • 🎨 A modern webview panel with a large editor area, rounded action buttons, and a live valid/invalid status bar
  • 🌗 Fully dark-mode compatible — uses native VS Code theme colors throughout
  • 📊 A one-click Statistics panel with a clean card-based grid
  • 🟢 A status bar item (JSON ✓ / JSON ✗) that reflects the active file's validity at a glance — click it to open the formatter panel

📸 Screenshots

Add screenshots of the webview panel, status bar, and statistics view here before publishing to the Marketplace.

docs/screenshot-panel.png · docs/screenshot-statusbar.png · docs/screenshot-stats.png


📦 Installation

  1. Open Extensions in VS Code (Ctrl+Shift+X / Cmd+Shift+X).
  2. Search for JSON Formatter Pro by WhySubaru.
  3. Click Install.

Or install from the command line:

code --install-extension WhySubaru.json-formatter-pro

🚀 Usage

  • Open any .json or .jsonc file.
  • Select some JSON (optional) — commands operate on your selection if one exists, otherwise the whole document.
  • Run a command from the Command Palette (Ctrl+Shift+P / Cmd+Shift+P), the right-click menu, or the status bar.

⌨️ Commands

Command Description
JSON Formatter Pro: Format JSON Pretty-print the selection/document
JSON Formatter Pro: Minify JSON Remove all insignificant whitespace
JSON Formatter Pro: Validate JSON Check for JSON errors, jump to the exact location
JSON Formatter Pro: Copy JSON Copy formatted JSON to the clipboard
JSON Formatter Pro: Show Statistics Display key/type counts and size
JSON Formatter Pro: Open Formatter Open the webview formatter panel
JSON Formatter Pro: Format From Clipboard Format clipboard JSON into a new editor
JSON Formatter Pro: Sort Keys Alphabetically Recursively sort object keys
JSON Formatter Pro: Escape JSON String Escape text into a JSON string literal
JSON Formatter Pro: Unescape JSON String Unescape a JSON string literal
JSON Formatter Pro: Remove Trailing Commas Fix lenient JSON with trailing commas
JSON Formatter Pro: Toggle Indentation Cycle 2 spaces → 4 spaces → tabs

🖱️ Right-Click Menu

On any .json / .jsonc file, right-click in the editor to access:

  • Format JSON
  • Minify JSON
  • Validate JSON

🟢 Status Bar

A JSON ✓ (or JSON ✗ when invalid) indicator appears in the status bar whenever a JSON file is active. Click it to instantly open the formatter panel.


⚙️ Settings

Setting Type Default Description
jsonFormatter.indentSize number (2 or 4) 2 Spaces used for indentation when formatting
jsonFormatter.sortKeys boolean false Automatically sort object keys alphabetically when formatting
jsonFormatter.autoValidate boolean true Automatically validate JSON files on open/edit/save
jsonFormatter.showNotifications boolean true Show success/info notifications for actions
jsonFormatter.useTabs boolean false Use tabs instead of spaces for indentation

❓ FAQ

Does it work on huge JSON files? Yes — formatting, minifying, and validation all rely on the native JSON.parse/JSON.stringify engine, which is highly optimized for large payloads.

What happens if my JSON is invalid? JSON Formatter Pro never crashes. You'll get a clear error message with the exact line and column, and the editor cursor will jump straight to the problem.

Does formatting change my data? No. Formatting and minifying only affect whitespace — your data values are never altered (unless you explicitly use Sort Keys, which only reorders object keys).

Can I use this on JSON with comments (JSONC)? The core formatter targets strict JSON. Use Remove Trailing Commas to clean up lenient JSON before formatting if needed.

Is my clipboard data sent anywhere? No. Everything runs 100% locally inside VS Code — nothing is sent over the network.


📄 License

Released under the MIT License.

💬 Support

Found a bug or have a feature request? Please open an issue on the GitHub repository.


Made with ❤️ by WhySubaru

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