JSON formatter and validator

The online JSON (JavaScript Object Notation) formatter converts the JSON data into a more human readable code for debugging purpose.

JSON is a text-based open standard data-interchange format and often used to transmit data between a server and web/mobile application. The transmitted JSON data usually has no line breaks to save space which makes it difficult to read. The official MIME type for JSON is: application/json.

This online tool also validate the JSON data if it conforms to the JSON specification as described in RFC 4627.
If the JSON data is malformed this tool will show the line number where the error occurs.

JSON data example:

   "firstName": "Peter",
   "lastName": "Parker",
   "age": 25,
   "address": {
      "streetAddress": "187 Chrystie Street",
      "city": "Manhattan",
      "state": "NY",
      "postalCode": 10001
   "phoneNumber": [
         "type": "home",
         "number": "212 456-3423"
         "type": "fax",
         "number": "212 256-5348"

JSON has 6 basic types:
  • Number
    Example: 24, -27, 1.23, 12E+2

  • String
    The string value is double-quoted.
    If the string contains double quotes (") or backslashes you must escape these characters.
    Example: "test", "\"hello world\"", "c:\\windows"

  • Boolean
    Example: true, false

  • Array
    An ordered sequence of values, comma-separated and enclosed in square brackets; the values do not need to be of the same type.
    An empty array can be represented by [ ]
    Example: [1,2,4], ["aa","bb"], [true, 24, "aa"]

  • Object
    An unordered collection of key:value pairs with the ':' character separating the key and the value, comma-separated and enclosed in curly braces. The keys must be strings and should be distinct from each other. The key should be contained in double quotes.
    JavaScript does not require this. JavaScript and some parsers will tolerate single-quotes.
    Recommended: Always double quote the keys!
    Example: {"name":"James", "age":37}

  • null
    This data type means empty.
    Example: {"fistName":null, "lastName":null}
White space may be added freely around brackets "{  }    [  ]", colons ":" and commas ",".

rss feed

Enter JSON data:

Load JSON data from URL: Help        
JSON data *: Help
Formatting: Help
Validate: Help
* = required            

JSON data validity:

The formatted JSON data: