Free · No sign-up · Private
JSON Formatter
Beautify JSON with configurable indentation and copy the formatted result.
Quick answer
Paste JSON and the formatter parses it and prints it again with consistent indentation, one key per line. Choose 2 spaces, 4 spaces or tabs. If the JSON is invalid, the error message shows what the parser expected and where it stopped.
{
"name": "UNSEEN",
"tools": [
"json",
"base64"
]
}Step by step
How to use the JSON Formatter
01
Paste your JSON.
02
See it formatted with indentation.
03
Copy the result.
Worked examples
Before and after
| Minified | Formatted (2 spaces) |
|---|---|
| {"name":"UNSEEN","tools":["json","base64"]} | { ↵ "name": "UNSEEN", ↵ "tools": [ "json", "base64" ] ↵ } |
Good to know
Common JSON errors
Trailing commas after the last item, single quotes instead of double quotes, unquoted keys and comments are all invalid in JSON, even though JavaScript accepts some of them. Fix the line the error points to and format again.
Private by design
Formatting happens in your browser with JSON.parse and JSON.stringify. API keys or customer data in your JSON are never uploaded.
Reading large JSON responses
API responses and log lines are usually minified onto a single line. Formatting them puts each key on its own line and indents nested objects and arrays, so you can follow the structure, spot missing fields and copy a path. For very large files, collapse what you do not need in your editor after formatting here.
FAQ
Frequently asked questions
Does formatting change my data?
No. Only whitespace changes. Very large numbers beyond JavaScript’s safe integer range may be rounded.
How do I minify JSON instead?
Use the JSON minifier, which removes all unnecessary whitespace.
More developer tools
Related tools
JSON Validator
Validate JSON and pinpoint syntax errors with a friendly message.
Open toolJSON Minifier
Minify JSON by removing all whitespace for the smallest possible size.
Open toolBase64 Encoder
Encode text into a Base64 string for safe transport.
Open toolBase64 Decoder
Decode a Base64 string back to readable text.
Open tool