JSON Formatter
Validate, pretty-print, minify and sort JSON keys, with byte/line/node stats.
About
Validate and reformat a JSON string. Inputs: `json` (required) and optional `mode` ("format" pretty-prints with 2-space indent, "minify" compresses). Returns the formatted text plus stats (bytes, lines, nodes, depth). Use when a user pastes JSON and wants it cleaned up, minified or checked.
Parameters
| Name | Type | Description |
|---|---|---|
json * | string | The JSON document as a string. |
mode | format | minify | Output mode. (default: "format") |
locale | en | zh | UI language for the rendered card. (default: "en") |
Examples
- Format this JSON and tell me how many nodes it has.
- Minify this JSON.
Use it
In the browser: https://mcp.gholl.com/embed/json-formatter
As an AI tool: call json-formatter on the MCP endpoint https://mcp.gholl.com/mcp.
{
"mcpServers": {
"gholl": {
"type": "http",
"url": "https://mcp.gholl.com/mcp"
}
}
}
Related tools
- Cron & Regex Debugger — Translate a cron schedule into plain language, preview the next runs, and test regular expressions with live highlighting.
- JWT Decoder — Decode a JWT into its header, payload and claims, and check whether it is expired.
- Hash Generator — Compute SHA-1 / SHA-256 / SHA-512 digests of text as hex and base64, entirely in your browser.