ParseJSON LogoParseJSON

JSON Formatter

Paste minified JSON and format it with your preferred indentation. Validates as it formats and reports exact error positions.

Indent:
Input

What Does a JSON Formatter Do?

A JSON formatter (also called a JSON beautifier or JSON pretty-printer) takes compact or minified JSON and adds indentation and newlines to make it human-readable. The result is identical data, just structured for readability.

ParseJSON uses JSON.parse() to validate your input, then JSON.stringify(null, n) to re-serialize it with the indentation you choose. If the input is invalid, you get the error message and position instead of silently broken output.

Formatting Example

Input (minified):

{"name":"Alice","age":30,"roles":["admin","user"]}

Output (formatted, 2-space indent):

{
  "name": "Alice",
  "age": 30,
  "roles": [
    "admin",
    "user"
  ]
}

Indentation Options

Use the indent buttons in the toolbar to choose 2, 3, 4 spaces, or a tab character. Your choice is saved in localStorage and applied automatically next time you visit.

Related Tools