JSON Formatter – Format, Validate & Minify JSON

Calcon's free JSON Formatter lets you format, beautify, minify, and validate JSON instantly in your browser. Switch to Tree View to explore deeply nested structures. Nothing is sent to any server.

JSON Syntax Rules

Keys must be strings

{"name": "value"} ✓ — {name: "value"} ✗

Strings use double quotes

"hello" ✓ — 'hello' ✗

No trailing commas

{"a":1} ✓ — {"a":1,} ✗

Values: string, number, bool, null, object, array

"true" vs true (boolean)

No comments

JSON does not support // or /* */ comments

Frequently Asked Questions

What is JSON and why format it?

JSON (JavaScript Object Notation) is the universal data format for APIs and configuration files. Formatting adds consistent 2-space indentation and newlines to make it human-readable. Minifying strips all whitespace to reduce transfer size.

How does JSON validation work?

The validator runs JSON.parse() on your input. If parsing succeeds, the JSON is structurally valid. If it fails, the browser engine returns an error message identifying the problem — such as a missing comma, unclosed bracket, or unquoted key.

What is the tree view?

Tree view renders JSON as a collapsible hierarchy — similar to how browser DevTools display JSON responses. Click any object {} or array [] node to collapse or expand it. This makes it easy to navigate large, deeply nested JSON structures.

Is my JSON data secure?

Yes. All processing happens entirely in your browser using JavaScript. No data is sent to any server. You can safely paste sensitive API responses or configuration data.

Related Developer Tools