About JSONFormatter

JSONFormatter.io is the #1 online tool to format, parse, view, validate, edit, and beautify JSON data in real time. The powerful, feature rich, and user friendly JSON editor gives you a native editing experience.

To format JSON, type or paste your JSON data in the first editor and click on the format/validate button to validate and format the entered JSON. You can view the parsed and beautified JSON in the second editor.

The tool also allows you to upload a .json or .txt file containing JSON data. It reads the file and automatically fills the editor with the file’s contents. Moreover, there are various other controls provided in the settings toolbar to clear, copy, minify, prettify, and download JSON data from the editor.

So what are you waiting for? Bookmark this website now and keep checking whenever you need any of the following:

  • Online JSON Formatter or Beautifier
  • Online JSON Viewer or JSON Editor
  • Online JSON Parser and JSON Validator

What is JSON?

JSON or Javascript Object Notation is a lightweight and language independent data-interchange format. JSON uses human-readable text. It is self-describing, easy to read and understand.

JSON format was originally derived from Javascript by Douglas Crockford. But now, almost all the modern programming languages can generate and parse JSON data.

JSON is commonly used data format for asynchronous browser-server communication. It has replaced XML in many AJAX style systems. It is more compact and easier to parse than XML.

The official Internet content type for JSON is application/json. Browsers and servers set the Content-Type HTTP header to application/json whenever JSON is used as the data-interchange format.

JSON Syntax

JSON data consists of two kinds of structures:

  • A collection of key/value pairs. This can be mapped to an Object or a HashTable in programming languages. The key/value pairs are specified like this -

    {
        "name": "Rajeev",
        "age": 25,
        "address": {
            "city": "Bangalore",
            "state": "Karnataka",
            "country": "India"
        }
    }

    As shown in the above example, the value can either be of simple type like number, string, or It can be another nested collection of key/value pairs.

  • An ordered list of values. The values can be either simple types like numbers, strings, booleans, or they can be nested JSON objects:

    [
        {
            "name": "Rajeev",
            "age": 25,
            "address": {
                "city": "Bangalore",
                "state": "Karnataka",
                "country": "India"
            }
        },
        {
            "name": "Sachin",
            "age": 40,
            "address": {
                "city": "Mumbai",
                "state": "Maharastra",
                "country": "India"
            }   
        }
    ]

As you can see, JSON structure and the rules are pretty simple. JSON is very easy to generate and parse. Perhaps, that’s why It is widely used in browser-server as well as server-server communications.