Explore clean, valid JSON examples and practical templates you can inspect, copy, or test in our free tools.
The most basic JSON structure consists of an object surrounded by curly braces { } containing key-value pairs separated by commas.
{
"id": 101,
"name": "Jane Doe",
"email": "jane.doe@example.com",
"isActive": true,
"roles": ["admin", "developer"]
}Test this in the JSON Formatter or generate TypeScript interfaces.
Arrays in JSON are ordered lists enclosed in square brackets [ ]. Lists of objects are commonly used to represent table rows, search results, and database records.
[
{
"id": 1,
"product": "Mechanical Keyboard",
"price": 89.99,
"inStock": true,
"tags": ["hardware", "peripheral"]
},
{
"id": 2,
"product": "Ergonomic Mouse",
"price": 49.50,
"inStock": false,
"tags": ["hardware", "wireless"]
}
]Need a spreadsheet table? Convert this array to a CSV file using our JSON to CSV Converter.
JSON objects and arrays can be nested to any depth. This is widely used in e-commerce orders, user permissions, and relational data trees.
{
"orderId": "ORD-2026-9812",
"status": "shipped",
"customer": {
"name": "Alex Smith",
"contact": {
"email": "alex@example.com",
"phone": "+1-555-0199"
}
},
"shippingAddress": {
"street": "123 Innovation Way",
"city": "San Francisco",
"state": "CA",
"zip": "94105",
"country": "USA"
},
"items": [
{
"sku": "KB-RGB-01",
"quantity": 1,
"unitPrice": 120.00
},
{
"sku": "CBL-USBC-2M",
"quantity": 2,
"unitPrice": 15.00
}
],
"totalAmount": 150.00
}Inspect this tree interactively in the JSON Viewer or beautify your own complex JSON.
Modern REST and GraphQL web APIs wrap data in envelope structures containing status codes, pagination metadata, and payload arrays.
{
"status": "success",
"code": 200,
"metadata": {
"page": 1,
"pageSize": 20,
"totalCount": 154,
"hasMore": true
},
"data": [
{
"id": "usr_99a",
"username": "coder2026",
"createdAt": "2026-08-18T10:30:00Z"
}
]
}Validate your API payloads against RFC 8259 syntax using our JSON Validator.
GeoJSON is an open standard format designed for representing simple geographical features along with their non-spatial attributes.
{
"type": "FeatureCollection",
"features": [
{
"type": "Feature",
"geometry": {
"type": "Point",
"coordinates": [-122.4194, 37.7749]
},
"properties": {
"name": "San Francisco",
"category": "City"
}
}
]
}