Format, minify, validate & explore JSON β instantly, in your browser
| Type | Example | Notes |
|---|---|---|
| Object | {"key": "value"} | Keys must be double-quoted strings |
| Array | [1, "two", true] | Ordered list of values |
| String | "hello\nworld" | Double-quoted; escape with \ |
| Number | 42, 3.14, -1e5 | No leading zeros; no NaN/Infinity |
| Boolean | true / false | Lowercase only |
| Null | null | Lowercase only |
| Error message | Likely cause | Fix |
|---|---|---|
| Unexpected token ',' | Trailing comma after last element | Remove the trailing comma |
| Unexpected token 'u' | undefined used as a value | Replace with null |
| Unexpected token '/' | Comment in JSON (// or /* */) | Remove comments β JSON doesn't support them |
| Unexpected token ''' | Single-quoted string | Use double quotes |
| Unexpected end of JSON | Unclosed bracket or brace | Check bracket/brace balance |
Valid JSON must have a single root value (object, array, string, number, boolean, or null), strings in double quotes, no trailing commas, and no comments. Keys in objects must also be double-quoted strings.
The tool parses the JSON.parse error message to extract a character position, then counts newlines in the input up to that position to compute the exact line and column number. The error line is highlighted in the editor.
No. All formatting, validation, and tree rendering happens entirely in your browser using JavaScript. Your JSON never leaves your device.
Yes. Click the 'Open File' button and select a .json or .txt file. The contents are read using the FileReader API in your browser β no upload occurs.
The tree view renders your JSON as an expandable/collapsible hierarchy. Each node shows its type with color-coded badges. You can search keys and values and copy individual node values.