JSON Formatter
Paste JSON, pick a mode and copy the result. If the JSON is broken, you get the line, the column and a plain reason. Your data stays in your browser and is not sent anywhere.
Runs in your browser. Nothing you type is uploaded.
Result
155 B before, 219 B after (+41%).
- Keys
- 9
- Depth
- 2
- Objects
- 2
- Arrays
- 1
{
"product": "Acme Notes",
"plan": {
"name": "Pro",
"price": 12,
"currency": "USD"
},
"features": [
"offline",
"sync",
"search"
],
"active": true,
"trialDays": 14,
"owner": null
}How it works
- Validation
- The text is checked character by character against the JSON rules. The first problem is reported with its line, its column and a short reason, such as a missing comma or a trailing comma.
- Formatting
- Valid JSON is parsed and written out again with your chosen indent. Minify removes every space and line break that is not inside a string.
- Sorting keys
- Sort keys orders the keys of every object from A to Z, at every level. Array order never changes, because order inside an array has meaning.
- Privacy
- Everything runs in your browser. The JSON is not uploaded or stored anywhere.
Questions
Why is my JSON invalid when it works in JavaScript?
JSON is stricter than JavaScript. Keys and strings need double quotes, trailing commas are not allowed, and comments, undefined and NaN are not part of JSON.
Is it safe to paste API responses here?
Yes. The formatting runs in your browser and nothing is sent to a server. Still, remove secrets before you share the result with anyone.
Why did a big number change after formatting?
JSON numbers are read as JavaScript numbers, which are exact only up to 9,007,199,254,740,991. Keep long IDs as strings so they stay exact.
Get CapyLaunch Weekly
New indie launches and the week in AI tools and models, every Monday. Free, and you can unsubscribe anytime.
Your launch, this week. Free.
A reviewed listing, a permanent page with a link to your site, and feedback from makers who actually care.