Skip to main content

Pretty JSON

JSON Formatter & Minifier

Format or minify JSON and locate syntax errors by line and column. Clean up API responses and configuration files in your browser.

JSON Pretty

Ready

Click Pretty to format in place and validate the JSON.

How to format and check JSON

Paste an API response or configuration into the editor. Pretty adds indentation; Minify removes unnecessary whitespace. Syntax errors are listed with line and column so you can correct the source.

{
  "name": "JSON Example",
  "type": "object",
  "properties": {
    "string": "Hello, World!",
    "number": 42,
    "boolean": true,
    "array": [1, 2, 3],
    "object": {
      "key": "value"
    }
  }
}

Common Use Cases of JSON

Read an API response

Format a compact API response to inspect nested objects, arrays and individual values.

Check a configuration file

Locate syntax errors before copying JSON into a configuration file. Valid syntax does not prove that the settings are correct.

Prepare compact JSON

Use Minify to remove formatting whitespace before copying JSON into a request body or storing it.

JSON Syntax Rules

  • Data is in name/value pairs
  • Data is separated by commas
  • Curly braces {} contain objects
  • Square brackets [] hold arrays
  • Values must be one of: string, number, boolean, null, object, or array

Frequently Asked Questions