JSON Formatter & Beautifier
Free JSON formatter and beautifier: pretty print or minify JSON with 2 spaces, 4 spaces or tabs. Runs in your browser; nothing is uploaded.
Raw JSON
Stays in your browserResult
Shortcuts: Ctrl+Enter run · Ctrl+Shift+C copy result · / search (use ⌘ on Mac)
Next steps
Done here? Use the Send to… menu on the result to carry it on to JSON Parser, JSON Visualizer or JSON Editor.
Online JSON Beautifier & Minifier
Paste minified or hard-to-read JSON to get an instantly readable, indented version — or minify it the other way, stripping all whitespace down to the smallest payload before sending it over the wire. This is a lighter, save-free alternative to the full JSON Parser for when you just need a quick format or minify, without validation errors or a tree view. To check JSON against rules use the JSON Schema Validator. This JSON formatter indents, sorts and minifies JSON in your browser. It is a fast JSON formatter for developers who need readable indentation or a compact payload while debugging an API response.
How to beautify or minify JSON online
Paste your JSON into the input box. Click Beautify to get a properly indented, human-readable version with each key and value on its own line — ideal for reading a minified API response or config file. Click Minify to do the opposite: strip all unnecessary whitespace down to the smallest possible payload, which is what you'd want before embedding JSON in a URL or sending it over a bandwidth-constrained connection.
Beautify vs. minify — what actually changes
Neither operation touches the underlying data — no keys, values, or structure are added, removed, or reordered. Beautifying only adds whitespace and line breaks for readability; minifying only removes it. The parsed value is functionally identical either way, which is why this tool doesn't need a Save feature the way the full JSON Parser does — there's nothing about the result worth keeping beyond the current session.
Common use cases
- Making a minified API response readable before debugging it
- Shrinking a JSON payload before embedding it in a URL query parameter
- Quickly reformatting a config file without the overhead of the full JSON Parser's validation and tree view
Common mistakes and edge cases
- Integers beyond 2^53-1 silently lose precision — in practice,
9007199254740993beautifies to9007199254740992, since both operations round-trip through JavaScript's own number type. Don't rely on the beautified copy for very large IDs (Discord/Twitter-style snowflake IDs regularly exceed this). - Duplicate keys in the same object collapse to the last value — checked in testing,
{"a":1,"a":2,"a":3}beautifies to just{"a": 3}, since parsing builds a real object rather than reformatting the text as-is.