Indented JSON
Indentation and line breaks are removed. The values are the same.
{
"ok": true,
"items": [1, 2]
}Removes whitespace from one JSON value. Invalid input is not repaired.
Ctrl+Enter or ⌘+Enter runs this tool immediately.
Waiting for input.
Parsing stays in this browser. Input is not uploaded or saved.
Indentation and line breaks are removed. The values are the same.
{
"ok": true,
"items": [1, 2]
}Validate JSON, then pretty-print it with 2 or 4 spaces or minify it. Invalid JSON produces an error and leaves the output empty.
Check JSON syntax in the browser. Errors give a line and column, and duplicate keys that JSON.parse would silently drop are reported.
Convert valid JSON into YAML with 2-space or 4-space indentation. Nested objects, arrays, and multiline strings are preserved, and invalid JSON is reported instead of repaired.