← All tools

Clean and inspect

JSON Formatter, Validator & Minifier

Format, validate and minify JSON locally with readable errors and useful document statistics.

Ready to inspect
Processed locally
Output
Your processed output appears here.

No payload data is uploaded.

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.

01

Choose two-space, four-space or compact output

02

See the top-level shape, byte size and nesting depth

03

Sort object keys without changing array order

04

Copy finished JSON without uploading the source

How to use it

From payload to useful result.

  1. Paste or type

    Add a full JSON value, including an object, array, string, number, boolean or null.

  2. Choose an operation

    Format for reading, validate without rewriting, or minify for transport and storage.

  3. 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.

Keep working locally

Explore all JSON Anvil tools