Format minified/escaped JSON blobs into readable, pretty-printed JSON with one command.
Features
- Instantly convert single-line, quoted-and-escaped JSON blobs—like those from logs or APIs—into properly indented, readable JSON.
- Handles files where the JSON payload is surrounded by outer quotes and inner escape sequences.
Usage
- Open a file containing a minified or escaped JSON blob, such as:
"{\"name\":\"value\",\"list\":[1,2,3]}"
- Press
Ctrl+Shift+P (Cmd+Shift+P on Mac) to open the Command Palette.
- Type and select
Format Minified JSON.
- The document will be replaced with beautiful, readable JSON:
{
"name": "value",
"list": [1, 2, 3]
}
Convert Pretty/Regular JSON back to JSON Blob
- Open a file containing regular multi-line or pretty-printed JSON.
- Press
Ctrl+Shift+P (Cmd+Shift+P on Mac) to open the Command Palette.
- Type and select
Convert To JSON Blob.
- The file will be replaced with a single-quoted, escaped JSON blob suitable for embedding/transmission.
Example:
{
"hello": "world",
"list": [1, 2, 3]
}
Becomes:
"{\"hello\":\"world\",\"list\":[1,2,3]}"
Commands
Format Minified JSON
- Command ID:
json-formatter-extension.formatMinifiedJson
- Accessible from the Command Palette
Convert To JSON Blob
- Command ID:
json-formatter-extension.convertToJsonBlob
- Converts a pretty/normal JSON back to a minified escaped JSON blob for storage or cross-system copying.
Extension Settings
This extension has no settings.
Requirements
- Visual Studio Code 1.85.0 or newer
Release Notes
0.0.1
- Initial release. Format minified/escaped JSON blobs into pretty JSON.
For help or questions, visit the VS Code Extension documentation.
| |