Skip to content
| Marketplace
Sign in
Visual Studio Code>Formatters>vscode-pretty-jsonNew to Visual Studio Code? Get it now.
vscode-pretty-json

vscode-pretty-json

Chris Meyers

|
16,248 installs
| (2) | Free
Visual Studio Code extension that provides commands to format JSON
Installation
Launch VS Code Quick Open (Ctrl+P), paste the following command, and press enter.
Copied to clipboard
More Info

vscode-pretty-json

Visual Studio Code extension that provides commands to format JSON

Demo

Usage

  1. Open a new file and enter some unformatted JSON
  2. Open the command palette and run Pretty JSON: Prettify
  3. Run Pretty JSON: Uglify to revert back to the unformatted JSON

Configuration

By default, this extension does not define any keybindings in order to avoid interfering with existing settings. However, the commands provided by this extension can be bound to any keybinding. This can be done by opening the command palette, searching for Preferences: Open Keyboard Shortcuts (JSON), and adding something like the following:

[
  { "key": "ctrl+shift+p", "command": "vscode-pretty-json.prettify" },
  { "key": "ctrl+shift+u", "command": "vscode-pretty-json.uglify" }
]
  • Contact us
  • Jobs
  • Privacy
  • Manage cookies
  • Terms of use
  • Trademarks
© 2025 Microsoft