JSON Formatter & Validator
Check that a document is valid JSON, then format it, minify it, or browse it as a tree. The formatter, validator, tree, and minify tabs share one input.
Search the input
Formatted
{ "service": "MySpeedGauge", "online": true, "version": 1, "tools": [ "json", "csv" ] }
object · 105 bytes · 4 keys · depth 3 · Ctrl+Enter or ⌘+Enter formats
How to use it
- Paste JSON or upload a local file up to 1.5 MB.
- Choose 2 or 4 spaces, then format. Ctrl+Enter or ⌘+Enter does the same.
- Open Validator for the error location, Tree to collapse objects, or Minify for a single line.
- Search the input, then copy or download the result.
Common mistakes
- Comments and trailing commas are not valid JSON.
- Single quotes around keys or strings will fail validation.
- A large file over 1.5 MB is rejected before it is parsed.
Examples
Format an object
{ "b": 1, "a": [true, null] }
becomes a two-space document with the same key order.Read a syntax error
{ "ok": true, }
A trailing comma is invalid. The message includes a line and column when the engine reports a position.Frequently asked questions
Processing stays in this browser tab. What you paste is not uploaded, and this tool does not write it to local storage.