Cloudesk

JSON Formatter

Format and validate JSON data

Click "Format" to process your JSON.

About JSON Formatter

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data-interchange format that is easy for humans to read and machines to parse. It supports objects, arrays, strings, numbers, booleans and null.

What is Escaped JSON?

Escaped JSON is a JSON object serialised into a string, where inner quotes are prefixed with a backslash (e.g. {\"key\":\"value\"}). This often appears in API logs, HTTP headers, or configuration values.

Interactive Tree View

The result panel renders your JSON as a colour-coded interactive tree. Click any {} or [] node to collapse it and hide its children — useful for exploring large payloads.

JSON Syntax Cheat Sheet

Quick reference for JSON value types and syntax rules.

string

"Hello, World!"
"line1\nline2"
"with \"quotes\""

Must use double quotes. Use \\ to escape.

number

42
-3.14
0.5
1.5e10

Integer or float. No quotes. Scientific notation OK.

boolean

true
false

Lowercase only. No quotes. No other values allowed.

null

null

Represents an absent or empty value. Lowercase only.

array

[1, "two", true, null]
["a", "b", "c"]
[]

Ordered list. Mixed types allowed. Zero-indexed.

object

{
  "name": "Alice",
  "age": 30
}

Key-value pairs. Keys must be double-quoted strings.

Complete Example

{
  "name": "Alice",
  "age": 30,
  "active": true,
  "score": 9.5,
  "address": null,
  "tags": ["admin", "user"],
  "profile": {
    "avatar": "https://example.com/avatar.png",
    "bio": "Developer"
  }
}

How to Use JSON Formatter

  1. 1Paste your raw or escaped JSON into the input panel on the left.
  2. 2Click "Make Prettier" to format with 2-space indentation, or "Compress" to minify.
  3. 3If your JSON is wrapped in escaped quotes (e.g. {\"key\": \"value\"}), click "Parse Escaped".
  4. 4Click any object {} or array [] header in the result panel to fold/unfold that branch.

Related Tools