Pretty-print or minify JSON in your browser, without changing a single value
Paste JSON and get it back indented with 2 spaces, 4 spaces or tabs, or squeezed onto one line. Any valid JSON works: an object, an array, or a lone string or number. Numbers and strings are copied exactly as you wrote them, so 1.0 stays 1.0, a 20-digit ID is not rounded, and key order and escapes are untouched. Everything runs in your browser: your JSON is never uploaded, and there is no account to create.
No. Validating and formatting both run in your browser using JavaScript, so your JSON is never sent to a remote server and there is no account to create. The page keeps your last input and your indent setting in your own browser (localStorage) so they survive a reload; nothing is stored anywhere else.
No. The formatter only changes the whitespace between tokens. Strings, numbers, keys and their order are copied exactly as written: 1.0 stays 1.0, 1e5 stays 1e5, a number beyond 9007199254740991 is not rounded, escapes such as \u00e9 are kept, and a key that appears twice appears twice. Tools that parse and re-serialize the document cannot promise this.
Standard JSON (RFC 8259): double-quoted keys and strings, no trailing commas, no comments, and no NaN, Infinity or undefined. Any value may be the top level, not only an object. If the text is not valid, the page shows the parser error with the line and column where it went wrong.
Yes. The JSON to YAML, JSON to TOML and JSON to XML converters work in both directions, so you can also turn YAML, TOML or XML back into JSON. They are under the Tools menu and, like the formatter, run entirely in your browser.
It removes every space, tab and line break that is not inside a string, giving the smallest text with the same meaning. Switch it off to get the indented version back.
Formatting never transmits your JSON, so a confidential payload does not leave your machine. You can verify this: open your browser DevTools, switch to the Network tab, and format something — no request carries your data. Your last input is saved in your browser's localStorage (clear site data to remove it).
No. The formatter is free to use with no sign-up and no usage limits.