JSON Encode/Decode

Convert arrays to JSON strings and vice-versa

Add to favorite
Copy Clear
Copy Clear

What this tool can

JSON Encode converts array into a JSON string.
JSON Decode converts JSON string into an array.

What is JSON?

JSON is an abbreviation of Javascript Object Notation, this is a type of data that follows certain rules that most programming languages today can read. You can save it into a file or into a record inside a database easily. JSON has a simple format, easy to use and query than XML, so its applicability is now very popular.
For example: {"a": "apple", "b": "ball", "c": "cat"}

Some characteristics of JSON:
  • Each data information will have 2 parts: key and value
  • JSON strings are enclosed by braces {}
  • JSON keys and values must be enclosed in double quotes {"}, if you put them in single quotes, this is not a standard JSON string.
  • If several data presents, use commas as separators.
  • Key values in JSON can be string, number, empty (null), array, or object.
  • File json can be saved with any extension, however it is usually saved under the extension .json or .js

Useful for

  • Convert json to array (human readable) and allow explore inside data structure.
  • Find out json is valid or invalid.
  • Find out array structure is valid or invalid.

related tools