JSON Tool Kit is a lightweight, high-performance Visual Studio Code extension that helps developers quickly escape, unescape, stringify, parse, pretty-print, and minify JSON strings directly within the editor.
With full support for multi-cursor editing, custom selection areas, and full-document fallback, this extension integrates seamlessly into your formatting and refactoring workflows without any external dependencies.
Features
- Escape JSON String: Convert text into a JSON-escaped string without surrounding quotes.
- Unescape JSON String: Reverse escaping on text (supporting unicode, newlines, tabs, quotes, backslashes) with graceful syntax error reporting.
- Stringify Selection: Convert text into a valid JSON string literal (including surrounding quotes).
- Parse JSON String: Parse a JSON string literal (including surrounding quotes) back to raw text.
- Pretty Print JSON: Format raw JSON strings with 2-space indentation.
- Minify JSON: Remove all unnecessary whitespace from JSON.
- Multi-Cursor Support: Process multiple selections concurrently.
- Zero Dependencies: Lightweight footprint, targetting the latest VS Code API.
Installation
- Open Visual Studio Code.
- Go to the Extensions view (
Ctrl+Shift+X or Cmd+Shift+X).
- Search for JSON Tool Kit.
- Click Install.
Alternatively, you can install the extension from the command line:
code --install-extension pranavwaikar.json-tool-kit
Usage
Select the text you want to transform (or clear selection to operate on the entire document), open the Command Palette (Ctrl+Shift+P or Cmd+Shift+P), and run one of the following commands:
GIF Placeholder: Extension In Action

Command List & Examples
| Command ID |
Title |
Description / Behavior |
jsonStringTools.escape |
JSON String Tools: Escape JSON String |
Escapes special characters like " and \n without wrapping in quotes. |
jsonStringTools.unescape |
JSON String Tools: Unescape JSON String |
Decodes escape sequences like \" and \n back to normal text. |
jsonStringTools.stringify |
JSON String Tools: Stringify Selection |
Turns the selection into a valid double-quoted JSON string literal. |
jsonStringTools.parse |
JSON String Tools: Parse JSON String |
Parses a quoted JSON string literal back to raw text. |
jsonStringTools.pretty |
JSON String Tools: Pretty Print JSON |
Formats valid JSON with 2-space indentation. |
jsonStringTools.minify |
JSON String Tools: Minify JSON |
Compresses valid JSON by stripping whitespaces. |
Command Examples
1. Escape JSON String
- Input:
Hello "World"
Line 2
- Output:
Hello \"World\"\nLine 2
2. Unescape JSON String
- Input:
Hello \"World\"\nLine 2
- Output:
Hello "World"
Line 2
3. Stringify Selection
- Input:
Hello "World"
- Output:
"Hello \"World\""
4. Parse JSON String
- Input:
"Hello\nWorld"
- Output:
Hello
World
5. Pretty Print JSON
- Input:
{"name":"JSON Tool Kit","active":true}
- Output:
{
"name": "JSON Tool Kit",
"active": true
}
6. Minify JSON
- Input:
{
"name": "JSON Tool Kit",
"active": true
}
- Output:
{"name":"JSON Tool Kit","active":true}
Development
To develop and test the extension locally:
- Clone the repository:
git clone https://github.com/pranavwaikar/json-tool-kit.git
cd json-tool-kit
- Install development dependencies:
npm install
- Compile the TypeScript files:
npm run compile
- Open the project in VS Code:
code .
- Press
F5 to start a new Extension Development Host window.
- Open any file in the new window, select text, and test the commands.
Publishing
To package and publish the extension to the VS Code Marketplace:
- Install
@vscode/vsce globally:
npm install -g @vscode/vsce
- Package the extension (generates a
.vsix bundle):
vsce package
- Publish to the Marketplace:
vsce publish
Note: You will need a Personal Access Token (PAT) from Azure DevOps to publish.
License
This project is licensed under the MIT License.