What is this JSON formatter?
A formatter, validator, and minifier in one pane: paste JSON and get pretty-printed output with syntax colors, a strict validity check with the exact line and column of the first error, or a compact one-line version for transport. Non-standard input (single quotes, trailing commas, comments, Python-style None/True) is auto-repaired and flagged. Unlike most online formatters, everything runs in your browser: no upload, no storage, zero network requests.
How to use
- Paste JSON into the Document pane. The formatted result appears in the output pane.
- Press Format for pretty-printed output or Minify for a compact single line.
- Press Validate for a strict RFC-8259 check with the precise error line and column.
- Switch the output to Tree to explore structure, or Query to filter with JSONPath.
- Copy the result. Your input is never modified.
Examples
Minified → formatted
{"id":42,"name":"Ada","tags":["json","diff"]}{
"id": 42,
"name": "Ada",
"tags": [
"json",
"diff"
]
}Auto-repair non-standard JSON
{ 'name': 'Ada', active: True, } // from Python{
"name": "Ada",
"active": true
}Validate: precise error location
{
"a": 1,
"b":
}Line 4, col 1: Unexpected token '}', expected a value
Edge cases & gotchas
- JSON requires double quotes:
'single'quotes are invalid, but Format auto-repairs them. - Trailing commas and comments are not standard JSON (that's JSONC/JSON5); Validate flags them, Format fixes them.
NaNandInfinityare not valid JSON values.- Huge numbers lose precision beyond IEEE-754 doubles. Keep 64-bit IDs as strings.
- Duplicate keys are technically parseable but the last one silently wins, a common source of bugs.
FAQ
How do I format JSON online without uploading it?
This formatter runs 100% in your browser. Open DevTools → Network and verify: zero requests after load. Nothing is stored, either.
What does Validate check?
Strict RFC-8259 compliance, reporting the exact line and column of the first error with a readable message. If the input is repairable (single quotes, trailing commas, comments), it tells you Format can auto-fix it.
Can it fix broken or LLM-generated JSON?
Yes. Format auto-repairs common non-standard input: Python-style single quotes, None/True/False, trailing commas, and comments, and tells you when it did.
Does Format change my input?
No. Your input stays untouched; the formatted (or minified) result renders in the output pane with syntax colors, ready to copy.
How large a file can it handle?
Multi-megabyte documents parse in a background Web Worker so the page stays responsive.