Online JSON minifier

Minify your JSON data online and make it more compact and lightweight by removing unnecessary characters

What is JSON?

JSON (JavaScript Object Notation) is a lightweight data interchange format. It is easy to read and write and easy to parse and generate using code.
It is based on a subset of the JavaScript programming language.

JSON is a text format that is completely language independent but uses conventions that are familiar to programmers of many languages like C, C++, C#, Java or JavaScript. These properties make JSON an ideal data-interchange language.

JSON syntax

JSON is built on two universal data structures:

  • A collection of unordered name/value pairs: usually called in other languages, object, record, struct, dictionary, hash table, keyed list, or associative array.
  • An ordered list of values: called in other languages, array, vector, list, or sequence.

The JSON syntax is derived from the JavaScript object notation syntax:

  • Curly braces hold objects name/value pairs {...}
  • Square brackets hold arrays [...]
  • Object name/value pairs are separated by a colon"name": "value"
  • Object and array members are separated by commas [1,2,3]
  • Object names are enclosed in double quotes "name"
  • Object names must be unique within the object
  • String values must be enclosed in double quotes
  • Values can be one of the following data types:
    • a string "value"
    • a number-5.56e7
    • an object{...}
    • an array [...]
    • a boolean true orfalse
    • nullnull

Effects of JSON minification

Minification is the process of removing unnecessary characters from the source code without changing its functionality. JSON minification removes:

  • Spaces: all spaces are removed from the JSON data including spaces preceding the colon and following the comma. This makes the JSON data more compact by removing all the indentation.
  • Line breaks: all line breaks are removed from the JSON data which is transformed into a single line.
  • Tabs: all tabs are removed from the JSON data.