Messy input
{"id":1,"name":"Ada","tags":["x","y"],"active":true}The JSON Formatter validates and pretty-prints JSON, turning a single dense line into a readable, indented tree. It reveals the structure of nested objects and arrays, and flags syntax errors such as trailing commas or unquoted keys. The tool can also minify JSON back to a compact form. All of this runs in your browser, so API responses or config files containing sensitive values are never uploaded.
JSON (JavaScript Object Notation) is a lightweight, language-independent data format built from key/value objects, arrays, strings, numbers, booleans, and null. It is the default format for REST APIs, configuration files, and data interchange between services. Because JSON is usually transmitted compactly, formatting it is essential for inspecting payloads, debugging requests, and verifying structure. A formatter also acts as a quick validator that catches malformed data before it breaks your code.
The main file is the entry point for each run.
Use the Input panel to pipe standard input to your program when it needs data.
Run sends your code to a fresh hosted runtime and streams the result into the output panel.
Your draft stays in this browser, and Share creates a separate snapshot link.
{"id":1,"name":"Ada","tags":["x","y"],"active":true}{
"id": 1,
"name": "Ada",
"tags": [
"x",
"y"
],
"active": true
}{"id":1,"name":"Ada","tags":["x","y"],"active":true}{"user":{"id":1,"address":{"city":"Paris","zip":"75001"}},"roles":["admin","editor"]}{
"user": {
"id": 1,
"address": {
"city": "Paris",
"zip": "75001"
}
},
"roles": [
"admin",
"editor"
]
}[
{
"id": 1,
"name": "Widget",
"price": 9.99
},
{
"id": 2,
"name": "Gadget",
"price": 19.5
}
]{
"count": 42,
"ratio": 0.75,
"enabled": false,
"label": null,
"items": []
}{
"path": "C:\\tmp\\log.txt",
"quote": "She said \"hi\"",
"city": "caf\u00e9"
}{
"data": {
"items": [
{
"id": 1,
"meta": {
"tags": [
"a",
"b"
]
}
}
]
}
}The editor uses Monaco, the engine behind VS Code, with language-aware editing tools and familiar keyboard controls.
Paste JSON and it validates and pretty-prints it into a readable, indented tree.
Nested objects and arrays are expanded so the structure is clear.
Can also minify formatted JSON back to a compact single line.
Flags syntax errors like trailing commas or unquoted keys.
Acts as a quick validator to catch malformed data before it breaks code.
Switch between pretty-print and minify as needed.
All processing runs in your browser; API responses are never uploaded.
Config files with sensitive values stay on your machine.
Copy the formatted JSON to inspect payloads or debug requests.
Use it to verify structure before pasting into your app.
Output
Start typing to auto-process