Format a simple minified JSON object
Input
{"name":"John","age":30} Output
{
"name": "John",
"age": 30
} Useful when you copy compact JSON from an API response or script and want to read it quickly.
Developer Tools
Review practical JSON Formatter examples so you can understand expected input, output, and common patterns faster.
Use this free JSON Formatter to format JSON online, beautify minified JSON, and pretty print complex objects instantly. It is useful for API responses, webhook payloads, application logs, configuration files, exported JSON data, and frontend or backend debugging. Paste raw or compact JSON to make it readable, inspect nested objects and arrays, and catch invalid syntax before using the data in your app, script, request, or documentation.
Example pages are especially useful for developer tools because they show what good input looks like, what kind of output to expect, and how the tool behaves in common scenarios.
Input
{"name":"John","age":30} Output
{
"name": "John",
"age": 30
} Useful when you copy compact JSON from an API response or script and want to read it quickly.
Input
{"status":200,"data":{"user":{"id":17,"name":"Anna"},"roles":["admin","editor"]}} Output
{
"status": 200,
"data": {
"user": {
"id": 17,
"name": "Anna"
},
"roles": [
"admin",
"editor"
]
}
} Makes nested API payloads much easier to inspect during backend or frontend debugging.
Input
{"items":[{"id":1,"name":"Pen"},{"id":2,"name":"Book"}]} Output
{
"items": [
{
"id": 1,
"name": "Pen"
},
{
"id": 2,
"name": "Book"
}
]
} Helpful when reviewing returned lists of products, records, tickets, or search results.
Input
{"event":"login","success":true,"ip":"192.168.1.10","meta":{"browser":"Chrome","device":"Desktop"}} Output
{
"event": "login",
"success": true,
"ip": "192.168.1.10",
"meta": {
"browser": "Chrome",
"device": "Desktop"
}
} Useful for reading JSON logs copied from monitoring tools, browser consoles, or server output.
Input
{"type":"payment.succeeded","data":{"id":"pay_123","amount":4999,"currency":"USD"}} Output
{
"type": "payment.succeeded",
"data": {
"id": "pay_123",
"amount": 4999,
"currency": "USD"
}
} Helpful when testing third-party webhooks and checking field names, event types, and payload structure.
Input
{"env":"production","features":{"cache":true,"debug":false},"ports":[3000,3001]} Output
{
"env": "production",
"features": {
"cache": true,
"debug": false
},
"ports": [
3000,
3001
]
} Useful when reading app settings, feature flags, or exported configuration blocks.
Input
{"company":{"name":"Acme","departments":[{"name":"Engineering","teams":[{"name":"Platform","members":12}]}]}} Output
{
"company": {
"name": "Acme",
"departments": [
{
"name": "Engineering",
"teams": [
{
"name": "Platform",
"members": 12
}
]
}
]
}
} Useful when nested data becomes difficult to read in one-line JSON output.
Input
{"users":[{"id":1,"email":"a@example.com"},{"id":2,"email":"b@example.com"}],"total":2} Output
{
"users": [
{
"id": 1,
"email": "a@example.com"
},
{
"id": 2,
"email": "b@example.com"
}
],
"total": 2
} Useful for checking exported data before converting it to another format.
Input
{"name":"John",} Output
Invalid JSON
Trailing commas are not valid in JSON and should be removed before formatting.
Input
{name:"John"} Output
Invalid JSON
JSON keys must use double quotes, unlike some JavaScript object literals.
Input
{"company":{"name":"Acme","departments":[{"name":"Engineering","teams":[{"name":"Platform","members":12}]}]}} Output
{
"company": {
"name": "Acme",
"departments": [
{
"name": "Engineering",
"teams": [
{
"name": "Platform",
"members": 12
}
]
}
]
}
} Useful when nested data becomes difficult to read in one-line JSON output.
Input
{"users":[{"id":1,"email":"a@example.com"},{"id":2,"email":"b@example.com"}],"total":2} Output
{
"users": [
{
"id": 1,
"email": "a@example.com"
},
{
"id": 2,
"email": "b@example.com"
}
],
"total": 2
} Useful for checking exported data before converting it to another format.
Fix: Remove the last comma after the final key-value pair in an object or array.
Fix: Make sure every JSON key uses double quotes, for example "name" instead of name.
Fix: Replace single quotes with double quotes for JSON keys and string values.
Fix: Check every opening brace and bracket to make sure it has a matching closing character.
Fix: Copy the full object or array so the formatter can parse the complete structure.
After reviewing these examples, run the live tool with your own input. If your task involves a follow-up step, the related page can help you move to the next tool in the workflow.
Open the main JSON Formatter page and test your own real input.