JSON Input
Tree View
Paste JSON on the left, then click View.
Ready
Raw JSON
Formatted Output
Ready
About JSON
JSON — JavaScript Object Notation — is a lightweight, text-based data interchange format that is easy for humans to read and write, and easy for machines to parse and generate.
Originally derived from JavaScript, JSON is now a language-independent standard used across virtually every programming language and platform.
Data Types in JSON
- object — an unordered collection of key/value pairs wrapped in
{} - array — an ordered list of values wrapped in
[] - string — a sequence of Unicode characters in double quotes
- number — an integer or floating-point value
- boolean —
trueorfalse - null — the empty value
Rules
- Keys must be strings (double-quoted)
- Values can be any of the 6 types above
- No trailing commas allowed
- No comments allowed in standard JSON
References
- json.org — Official specification
- RFC 8259 — IETF standard
- MDN Web Docs — JSON guide
JSON Example
A sample JSON object representing a person record with nested objects and arrays:
{
"firstName": "John",
"lastName": "Smith",
"gender": "man",
"age": 32,
"address": {
"streetAddress": "21 2nd Street",
"city": "New York",
"state": "NY",
"postalCode": "10021"
},
"phoneNumbers": [
{ "type": "home", "number": "212 555-1234" },
{ "type": "fax", "number": "646 555-4567" }
],
"active": true,
"nickname": null
}