JSON Formatter
private · runs in your browser
~ $ devkit:json-format

JSON Formatter

Format, minify and validate JSON. Numbers and key order are preserved. Invalid input shows a syntax error.

Input
Output
Format or validate to see output here.

How to use JSON Formatter

  1. Paste JSON or select Sample to start with an example.
  2. Choose Format for indentation, Minify to remove optional whitespace, or Validate to check syntax. Copy the result when ready.

Example

Input: {"id":9007199254740993,"active":true}
Formatted:
{
  "id": 9007199254740993,
  "active": true
}

Details and limitations

Formatting preserves numeric text, key order and duplicate keys. JSON disallows comments and trailing commas. An error location is shown when the browser parser provides one. Preserving duplicate keys does not make their interpretation consistent across other applications.