Paste your JSON into the input pane and click Prettify to format it with your choice of indentation. Click Minify to compact it to a single line. Uses your browser's native JSON.parse(), so syntax is validated as part of the operation. Nothing leaves your machine.
Free, fast, runs in your browser. No login needed.
JSON.stringify(parsed, null, indent) is what runs here. The tool parses your input with the browser's native JSON.parse(), then serializes it back with the indentation you choose. That round-trip has two side effects worth knowing.
Key ordering. Key order is mostly preserved. JSON.parse() + JSON.stringify() retain insertion order for string keys in all modern engines — but integer-like keys ("0", "1", "2") get sorted numerically and hoisted to the front, matching the ECMAScript spec for array-index properties on plain objects. If your object has keys like "1" mixed with named keys, the output order may differ from the input.
Silent value transforms. JSON.stringify() drops keys whose value is undefined, replaces NaN and Infinity with null, and omits function-valued properties entirely. If your output has fewer keys than your input, that is why.
Common use cases: inspecting an API response that arrived as a minified string; cleaning up a config file before committing; pasting readable JSON into a pull request comment or bug report.
Limits. The tool uses strict JSON.parse() — no comments, no trailing commas, no single-quoted strings, no unquoted keys. If your input is JavaScript-style rather than strict JSON, use the JSON Repair tool first. There is no enforced size limit, but inputs above roughly 5 MB will cause the textarea to lag on keystrokes; the formatter itself will still run. Numbers larger than Number.MAX_SAFE_INTEGER (2⁵³ − 1) lose precision silently — a JavaScript runtime constraint, not specific to this tool. For data with large integer IDs or financial values, verify the output against your source.
Yes, free with no usage limits. No login, no account, no API key required.
No. Formatting runs entirely in your browser using native JavaScript. Your JSON never leaves your machine — there are no network requests involved.
There is no enforced limit. Inputs up to around 5 MB format without issues. Above that, the browser textarea may lag on keystroke events, but the formatter will still produce output. For very large files (50 MB+), a CLI tool like jq or python -m json.tool is more practical.
Same underlying operation, different interface. You get a line-numbered input pane, an indentation dropdown, a Prettify/Minify toggle, one-click copy, and a download button — without opening DevTools or writing any code.
JSON.stringify() silently drops keys with undefined values and removes function-valued properties. It also replaces NaN and Infinity with null. If your source is a JavaScript object serialized to a string (not a strict JSON document), those values may have been present.
This tool uses strict JSON.parse(), which follows the JSON spec. Comments (//, /* */) and trailing commas are not valid JSON. Use the JSON Repair tool on this site to strip them automatically before formatting.
Integer-like keys ("0", "1", etc.) are sorted numerically and placed before other keys by the JavaScript engine — this is ECMAScript-specified behavior, not a bug. Named string keys retain insertion order in all modern engines.