Skip to content
OddsockLocal
Local
Source text
{
  "color": "red",
  "count": 2
}
1 wordsRuns in this browser. Nothing is uploaded.

How to use

  1. Paste the JSON into Source text.
  2. Set View to raw, tree, schema, or validate.
  3. For raw, set Indentation to 0, 2, 4, or 8.
  4. For tree, set Tree depth. Keys deeper than that stay summarized.
  5. Copy the result.

What is JSON studio?

JSON studio is the workbench for one document. View chooses what you get back: raw text, a tree, a schema, or a validation sentence. Raw uses the Indentation control. Two spaces is the usual reading form. Zero spaces is the compact form, the same bytes a minifier would emit. Four and eight spaces are there when a house style asks for a wider indent.

Read more

Tree prints a foldable outline down to Tree depth, which starts at 8. Schema infers a draft 2020-12 document from the value you pasted. Validate returns Valid JSON when the text parses, and names the line and column when it does not. Each of those jobs also has its own page. This one keeps the document in place while you switch views.

Use cases

  • An API reviewer pastes a response, sets View to raw, and reads it at a two-space indent.
  • Someone debugging a deep payload switches to tree and lowers Tree depth so only the top keys show.
  • A contract draft starts from View set to schema on a real sample object.
  • A broken payload is checked with View set to validate so the line and column come back before any formatting.
  • A frontend engineer flips between indent 2 for review and indent 0 before pasting into a query string.

A two-key object, pretty-printed

{"color":"red","count":2}. View left on raw. Indentation left on 2.

{ "color": "red", "count": 2 } That form is 34 bytes. Indent 0 returns {"color":"red","count":2}, which is 25 bytes. Tree view prints $: Object(2), then "color": "red" and "count": 2.

Why use Oddsock

One paste can be pretty-printed, outlined, described as a schema, or rejected with a line number, without moving the document to another tool.

Related tools

Using this tool

The object {"color":"red","count":2} is 25 bytes. Indent 2 expands it to 34 bytes. Indent 4 expands it to 38 bytes.