JSON Formatter


JSON Formatter is used to Format JSON text, documents or files by indenting & syntax highlighting them. The objects are layed out in a tree like structure which can be easily expanded/collapsed. You can also choose whether to convert the property names in camel case. Dates can be converted to ISO or Microsoft date formats.



Input: Paste JSON text below



Settings


Output: Formatted JSON


JSON pronounced as "Jason" is the de facto standard for data interchange on the web these days. It is a simple format that is easier to comprehend than XML. It also has less size than XML because of no closing tags. Interacting with JSON from JavaScript is extremely seamless.
Indent
This setting governs whether or not the output is indented. The indented output is easier for humans to comprehend. On the other hand, a non-indented output is compact & smaller in size (best for transmission). So, JSON is often minified which compacts & compresses the output by removing non-essential whitespace. This is the most important use of this tool as people paste the minified JSON and try to understand what's in it via indentation.
Indentation On
{
  "name": "John Doe",
  "age": 69
}
Indentation Off
{"name":"John Doe","age":69}
Keys In Quotes
A valid JSON must have double quotes around the keys (or property names). However, when used directly inside JavaScript, this is not necessary (unless the keys have special characters in them). So, if you intend to use the output directly inside JavaScript, unselect this option.
Keys In Quotes On
{"name":"John Doe","age":69}
Keys In Quotes Off
{name:"John Doe",age:69}
Camel Case Property Names
When this option is selected, the casing of keys is converted to lowerCamelCase. This is the default naming convention of JSON fields & JavaScript variables.
Camel Case On
{"personName":"John Doe"}
Camel Case Off
{"PersonName":"John Doe"}

Use this option only when you are trying to cleanse a JSON structure because changing the keys will result in failure in applications that make use of this JSON format.
Expanded Braces
When this option is selected, braces are written on a new line (C# style). Otherwise braces are written on the same line (Java/JavaScript style).
Expanded Braces On
{
  "name": "John Doe",
  "age": 25,
  "addresses":
  [
    {
      "city": "Phoenix",
      "country": "Arizona"
    },
    {
      "city": "Miami",
      "country": "Florida"
    }
  ]
}
Expanded Braces Off
{
  "name": "John Doe",
  "age": 25,
  "addresses": [
    {
      "city": "Phoenix",
      "country": "Arizona"
    },
    {
      "city": "Miami",
      "country": "Florida"
    }
  ]
}
Format Embedded JSON
When this option is selected, JSON that is embedded or escaped within string values is processed, expanded & converted to nodes.
Format Embedded JSON On
{
  "name": "John Doe",
  "age": 25,
  "addresses": [
    {
      "city": "Phoenix",
      "country": "Arizona"
    },
    {
      "city": "Miami",
      "country": "Florida"
    }
  ]
}
Format Embedded JSON Off
{
  "name": "John Doe",
  "age": 25,
  "addresses": "[{\"city\":\"Phoenix\",\"country\":\"Arizona\"},{\"city\":\"Miami\",\"country\":\"Florida\"}]"
}
Date Format Handling
Even though, there is no standard for representing dates in JSON, two popular formats have emerged. The ISO Date Format being the most widely used. If you are using a .NET stack, quite possibly you are using the Microsoft Date Format.
ISO Date Format
{"systemTime":"2014-01-01T23:28:56.782Z"}
Microsoft Date Format
{"systemTime":"\/Date(1388618936782)\/"}
Feedback