Free Online JSON Playground
Write JSON and see it checked and shown as a collapsible tree as you type. Errors show what is wrong, and Format tidies the code.
Auto-run is on, so the preview updates as you type. Your JSON is checked and shown as a tree. An error shows what is wrong and where.
Preview
How to use
Type or paste JSON in the editor.
Watch the tree in the preview update as you type. Click a key to open or close it.
If the JSON is not valid, the preview shows what is wrong.
Press Format to tidy the code.
Use the icons in the editor to copy the code, open a file, download a zip of your files or clear everything.
Open the full screen editor for more room, and use the A buttons to resize the text.
Why use this tool
Checked as you type
Your text is read with the same parser browsers use, so valid here means valid in your code.
A tree you can open and close
Large documents are easy to explore, and each object and list shows how many items it holds.
Colours for each type
Strings, numbers, booleans and null look different, so a number written as a string stands out.
Nothing of yours is run
Your text is only read as data and shown as a result. No scripts run, and nothing is loaded from another site.
Format code
Tidy the indentation and spacing with one click or Shift + Alt + F.
Comfortable editor
Resize the text, switch line wrapping on or off, or go full screen with the editor and preview side by side.
About this tool
Validate and explore JSON as you type. Paste or write JSON and the playground checks it straight away and shows it as a collapsible tree, with strings, numbers, booleans and null in different colours. When the JSON is not valid, the preview shows the error, and Format tidies it with the right indentation. Use it to learn JSON, inspect an API response or find a missing comma.
Frequently asked questions
The usual causes are a trailing comma, single quotes instead of double quotes, keys without quotes, and comments (JSON does not allow them). The error message says what the parser found.
They are related. The JSON Formatter formats and minifies, while this playground is an editor with a live tree, so you can see the structure as you write.
There is no fixed limit, but the tree shows the first few thousand values, and says when more is not shown.
Only to open the page. The preview is made in your browser, and nothing is loaded from another site.
Yes. Press Format, or Shift + Alt + F while you are typing, to tidy the indentation and spacing. If the code has an error it is left unchanged and the error is shown.
Your last session is kept in this browser, so it is here when you come back. Use Download to keep a copy as a file.