JSON Prettify / Formatter - MacigHub

View, expand, collapse, search and format large JSON inputs with a collapsible tree and raw code view.

Popular tools: Base64 · JSON Diff · UUID · QR Code · Regex · Password

About this tool

What does it do?

It takes compact or messy JSON and reformats it with consistent indentation and line breaks, and can minify it back down. It also validates: malformed JSON gets a precise error instead of silent output.

How to use it

  • Paste JSON and choose pretty (readable) or minify (compact) output.
  • Adjust indent width to match your codebase.
  • Copy the result or download it as a .json file.

Examples

  • Turning a one-line API response into readable, reviewable structure.
  • Minifying a config before embedding it in a URL or HTML attribute.
  • Finding a missing comma: the validator points at the exact line.

Important limitations

  • Formatting never changes data — but duplicate keys in one object are inherently ambiguous in JSON.
  • Numbers beyond double precision may lose exactness when parsed; the tool preserves text where possible.
  • Comments are not valid JSON and will fail validation (use JSON5 or YAML for commented configs).

Privacy

Everything runs locally in your browser. API keys and tokens often hide inside JSON you paste — they stay on your device.

Frequently asked questions

Pretty or minify — when?

Pretty for reading, debugging and code review. Minify for storage, URLs and wire transfer.

Does it sort keys?

No — key order is preserved as written; only whitespace changes.

Why did validation fail on trailing commas?

Strict JSON forbids trailing commas. Remove them or switch to a superset format.

Related tools

JSON diff · JSON minify · JSON to CSV