Skip to content
Control Plane Labs

JSON Formatter and Validator

Paste JSON, get it pretty-printed or minified. Validates syntax, highlights errors, works entirely in your browser.

Privacy: Everything runs in your browser. Your JSON is never uploaded or logged.

Nothing about your JSON leaves your browser. Bookmarkable link updates as you type (input truncated in URL over 2 KB).

What it does

Takes a blob of JSON — minified, messy, or perfectly formatted — and hands it back the way you want it. Pretty-print with 2- or 4-space indent, or minify to a single line. Invalid JSON is flagged with the parser’s own error message so you can see exactly which character tripped it up.

How it works

The tool parses your input with the browser’s native JSON.parse and re-serializes with JSON.stringify. Both are part of the ECMAScript specification and follow RFC 8259. No network round trip, no server involved.

Your input is echoed into the URL query string (up to 2 KB) so you can bookmark or share the current state. If you paste larger inputs, the URL truncates and only the local textarea retains the full content.

When to reach for it

  • You have a minified API response and you want to eyeball the structure.
  • You are pasting a config into a template and need consistent indentation.
  • Your log line is a JSON string and you want to see the shape of the object before writing a parser.
  • You suspect a JSON payload is malformed and you want the exact position of the error.

Read the paired guide: The YAML + JSON reference for people who read config files all day.

Frequently asked questions

Does my JSON leave my browser?+
No. The tool uses your browser's built-in JSON.parse and JSON.stringify. Nothing is sent to a server. Your input is echoed only to the URL query string (up to 2 KB) so you can bookmark or share your work.
Why is my output missing keys or in a different order?+
JSON objects have no ordering guarantee. Most engines preserve insertion order but the specification does not require it. If ordering matters for your use case, sort keys explicitly before serializing.
Which JSON dialect does this accept?+
Strict RFC 8259 JSON only. Trailing commas, unquoted keys, comments, and single quotes are not accepted. Use a JSON5 tool for those.
Can I paste a very large file?+
The textarea will accept any size your browser tab can hold, but the URL only preserves inputs under 2 KB. Very large inputs will format but will not survive a page reload.
How do I minify a file for a production build?+
Switch to Minify mode and click Copy result. For build-time minification, prefer JSON.stringify(obj) in a Node.js script — it produces byte-identical output.

→ Read the full guide:How this tool actually works