purr.tools

JSON Formatter

Paste your JSON to format (prettify) or minify it. Errors are highlighted instantly.

Input JSON

Share this calculation

Copy this link to share your current inputs with anyone.

How to format JSON

Paste your JSON into the input box. Click Format to prettify with 2-space indentation, or Minify to strip all whitespace. Any syntax error is shown immediately so you can fix it.

JSON syntax rules

JSON keys must be double-quoted strings. Values can be strings, numbers, booleans (true/false), null, arrays, or objects. Trailing commas are not allowed. Use this tool to catch those issues fast.

FAQ

Is my data sent to a server?

No. This tool runs entirely in your browser using JavaScript. Your JSON never leaves your device.

What is the difference between Format and Minify?

Format adds indentation and newlines to make JSON human-readable. Minify removes all unnecessary whitespace to reduce file size — useful before sending JSON over a network.

Embed this tool

Add this tool to your website by copying the snippet below.

<iframe
  src="https://purr.tools/en/embed/json-formatter"
  width="100%"
  height="500"
  style="border:0;border-radius:8px;"
  loading="lazy"
  title="JSON Formatter & Validator — Free Online Tool"
  allow="clipboard-write"
></iframe>