Why this tool exists
Work with the structure, not the noise.
JSON Anvil turns compact or irregular JSON into a consistent, readable document. The formatter uses the browser’s standards-based JSON parser, so the output follows the same parsing rules used by modern JavaScript runtimes. Invalid input is never silently changed: you receive the parser error so you can decide what should be repaired.
Choose two-space, four-space or compact output
See the top-level shape, byte size and nesting depth
Sort object keys without changing array order
Copy finished JSON without uploading the source
How to use it
From payload to useful result.
Paste or type
Add a full JSON value, including an object, array, string, number, boolean or null.
Choose an operation
Format for reading, validate without rewriting, or minify for transport and storage.
Review before copying
Use the status line and output preview to confirm the document parsed as expected.
Common questions
Before you use the output.
Does formatting change JSON values?
No. Formatting changes whitespace only. Key sorting is optional and never reorders array items.
Can the formatter accept comments?
Strict JSON does not permit comments. Use the repair tool when you need to clean JSONC-style comments or trailing commas.