How it works:
Paste JSON code to validate syntax, format with proper indentation, or minify it. Perfect for debugging API responses and working with JSON data.
Paste minified or messy JSON to pretty-print it with clean indentation and instantly see whether it's valid. It's the fastest way to make an API response or config file readable and to catch a syntax error.
What is JSON?
JSON (JavaScript Object Notation) is a lightweight text format for structured data, and it's the common language of web APIs and config files. It has just a few building blocks: objects in { } with "key": value pairs, arrays in [ ], plus strings (always double-quoted), numbers, true/false, and null. That small, strict grammar is exactly why it's easy for programs to parse reliably.
When and why you'd use it
- Reading an API response — turn a one-line blob into an indented tree you can actually scan.
- Debugging config — find the missing brace or stray comma that's breaking a
package.json,tsconfig, or settings file. - Cleaning data before sharing — format it for a bug report, or validate that generated JSON is well-formed.
Worked examples
Formatted, it becomes an indented object with a nested array — each key on its own line, easy to read.
Two problems: single quotes (JSON requires double quotes) and a trailing comma after the last pair. Fixed: {"name": "Ada"}.
Frequently asked questions
Why does my JSON say it's invalid?
The usual culprits are all things JSON forbids: trailing commas, single quotes, unquoted keys, and comments. Remove those and it will validate.
Isn't JSON just a JavaScript object?
They look alike, but JSON is stricter: keys must be double-quoted strings, no comments, no functions, no trailing commas. Every JSON document is valid JS, but not every JS object literal is valid JSON.
Does formatting change my data?
No — it only adds or removes whitespace. The keys, values, and structure are identical; it's purely for readability (or minifying).
Can I use comments in JSON?
Not in standard JSON. Formats like JSONC or JSON5 allow comments and are used by some editors, but a strict JSON parser will reject them.
Is my data sent anywhere?
No. Formatting and validation run entirely in your browser.