OneJobKit

HomeDeveloper ToolsJSON formatterBrowser

Format and validate JSON

Pretty-prints JSON into a collapsible tree at the indent you choose, or minifies it. Fields holding escaped JSON strings expand in place — one click, or every level at once. Invalid input reports the parser's own error message and position, because 'invalid JSON' on its own is useless for finding the problem.

117 B
{
name:"onejobkit"
tags:[
0:"image"
1:"pdf"
]
stars:42
active:true
payload:"{"queued":3,"labels":["beta"]}"
}

8 nodes · 151 B

How to use it

  1. 1Paste your JSON into the input box.
  2. 2Switch between the tree and the plain-text view.
  3. 3Set the indent, or choose Minified to strip every space.
  4. 4Click a field holding escaped JSON to expand it in place — alt-click a node to fold or unfold its whole subtree.

Frequently asked questions

My JSON is invalid — how do I find where?
The error line quotes the parser's own message and the position it stopped at, rather than just saying "invalid JSON". Unexpected end of input usually means a missing closing brace; unexpected token is normally a trailing comma or a single quote where JSON requires a double one.
What does expanding nested JSON do?
APIs often put a whole JSON document inside a string field, escaped, where it shows up as an unreadable wall of backslashes. Clicking it parses that string and renders it as a real subtree, so you can read it without pasting it into a second tab. There is an option to expand every level at once.
Is my data sent anywhere?
No. Parsing and rendering happen in the page, which is the reason this is safe to use with a payload that has a token or customer data in it — the usual reason not to paste production JSON into a random formatter.
What is the difference between formatting and minifying?
Formatting adds indentation and line breaks so a human can read it. Minifying removes every byte that is not meaningful, which is what you want in a config value, a query parameter or anywhere size matters. The data is identical either way.
Does sorting keys change the meaning?
No. JSON objects are unordered by definition, so sorting alphabetically is safe and makes two documents easy to diff. Arrays are ordered and are never touched.