Overview
JSON is the world's most successful strict format: simple enough to read, rigid enough that one stray comma voids the whole document. APIs return it minified into an unreadable wall; config files accumulate subtle errors; humans add trailing commas out of habit. This formatter is the strict friend who finds the flaw and the tidy colleague who lays the document out properly.
Three jobs, one page: pretty-print with your choice of indentation, minify for transport, and validate without touching a character. Structural stats — keys, objects, arrays, depth, bytes — tell you at a glance what you are dealing with before you dive in.
Why is JSON so strict?
JSON (JavaScript Object Notation) is a text format for structured data built from a tiny grammar: objects in braces with quoted keys, arrays in brackets, strings in double quotes, numbers, and the literals true, false and null. That is almost the entire language — its power comes from the strictness. Because every parser implements the same small spec, JSON became the default envelope for web APIs.
The strictness is also the pain. JSON is not JavaScript: no comments, no trailing commas, no single-quoted strings, no unquoted keys. Each of those is valid in a JS object literal and fatal in JSON — which is exactly why a validator that speaks the spec, rather than your intuition, earns its keep.
Features
- Pretty-print your way — two spaces, four spaces or tabs, applied consistently through every level.
- One-click minify — strips non-essential whitespace for the smallest faithful version.
- Standalone validation — check correctness without altering a single character.
- Honest errors — the parser's own message, pointing at the real problem.
- Structural stats — key count, objects, arrays, maximum depth and byte size at a glance.
- Copy and download — clipboard in one click, or save the result as a .json file.
- Completely local — your browser's JSON engine does the work; nothing is stored.
Benefits
- Read the unreadable. Minified blobs become navigable documents.
- Ship smaller payloads. Minify with confidence that nothing changed semantically.
- Debug with evidence. Exact error positions beat staring at raw text.
- Private parsing. API keys and payloads stay on your machine.
Who can use it
Developers debugging API responses, data engineers eyeballing payloads, QA testers validating fixtures, students learning the format, and anyone who has inherited a 10,000-line config file and needs to know where it breaks. Support staff pasting customer payloads get answers without involving an engineer.
How to use
- Paste your JSON into the input box.
- Choose an indent style, or press Minify for the compact form.
- Press Format — or Validate to check without changing anything.
- Read any error message; it points at the exact problem spot.
- Copy the result or download it as a .json file.
Frequently asked questions
What is the most common JSON error?
Trailing commas are the classic: {"a": 1,} is invalid JSON even though JavaScript objects allow it. Close behind are single quotes instead of double, unquoted keys, comments, and stray control characters. The validator reports the parser's own message with the position, so you can fix the exact spot instead of re-reading the file.
Does minifying change my data?
Whitespace outside strings is meaningless in JSON, so removing it changes nothing semantically — the parsed data is identical. What minification does lose is human readability and meaningful diffs, which is why you minify copies for transport and keep the pretty version for humans.
Which indent size should I use?
Indentation is cosmetic; pick whatever your team uses. Two spaces is the most common in the wild, four spaces reads well for deeply nested data, and tabs keep files smaller. The formatter applies your choice consistently through every nesting level.
What does “maximum depth” tell me?
Depth counts how many levels of nesting the deepest value sits at. Shallow, wide documents are easy to work with; very deep ones (dozens of levels) often signal a data model worth flattening. The stat is a quick smell test when you inherit someone else's payload.
Does it accept JSON with comments?
It validates against the JSON specification strictly — no comments, no trailing commas, no single quotes. Some tools accept “JSON with comments” (JSONC); if your file uses those extensions, strip them first or validate with a JSONC-aware tool.
Is my JSON uploaded anywhere?
No. Parsing runs in your browser's own JSON engine; the text never leaves the tab. Paste production payloads, API keys and all, with the same confidence as a desktop tool.
Conclusion
JSON rewards the precise and punishes the sloppy — one trailing comma and the whole document is void. Paste it here, let the formatter find the flaw and pretty-print the truth, and keep the minifier handy for the trip back to production.