JSON Formatter — Format, Minify & Validate Online
Paste JSON — format, minify, or validate it.
Paste messy JSON, get clean, readable, validated JSON back. Format for debugging, minify for shipping, validate to find that one missing comma. Everything runs locally — safe for API keys and production payloads.
Paste JSON, then press Format, Minify, or Validate.
The three modes
- Format — pretty-print with indentation. For reading and debugging.
- Minify — strip all whitespace. For network payloads and embedding.
- Validate — syntax check with precise line/column error locations.
Common JSON errors this catches
| Error | Example | Fix |
|---|---|---|
| Trailing comma | {"a": 1,} | Remove the comma |
| Single quotes | {'a': 1} | Use double quotes |
| Unquoted keys | {a: 1} | Quote the key: {"a": 1} |
| Comments | {"a": 1 /* x */} | Remove comments |
| Missing comma | {"a": 1 "b": 2} | Add comma between pairs |
Keyboard-friendly workflow
- Paste from your editor or API response.
- Format to inspect the structure.
- Fix any flagged errors.
- Copy the clean output back.
No sign-up, no data retention — the JSON you paste exists only in your tab’s memory.
Frequently asked questions
How do I format JSON?
Paste your JSON above and press “Format”. It pretty-prints with 2-space indentation so nested objects and arrays are easy to read.
What does minify do?
Minify strips all unnecessary whitespace — one compact line. Use it before sending JSON over the network or embedding it in code where size matters.
How do I find a JSON syntax error?
Press “Validate”. If the JSON is broken, you'll get the exact line and column of the problem — the most common culprits are trailing commas, unquoted keys, and single quotes.
Is my JSON data uploaded anywhere?
No. Formatting and validation run 100% in your browser. API keys, tokens, and payloads you paste never leave your device.
Can I validate JSON against a schema?
This tool checks syntax validity (is it well-formed JSON?). For schema validation (does it match my expected structure?), use a dedicated JSON Schema validator.
What's the difference between JSON and JavaScript objects?
JSON is stricter: keys must be double-quoted, no trailing commas, no comments, no functions. `{name: 'x',}` is valid JS but invalid JSON — it must be `{"name": "x"}`.