JSON फ़ॉर्मैटर
JSON formatter and validator
Paste messy or minified JSON and get it readable, validated, or squeezed back down.
Runs in your browser · nothing uploaded
Paste JSON to format and validate it.
How to use it
- 01Paste your JSON.
- 02Choose Format (with indent size) or Minify.
- 03Fix any error at the line and column shown, then copy or download.
{"name":"Akshar","tools":2}
{ "name": "Akshar", "tools": 2 }
About this tool
The JSON is parsed with the browser's strict JSON parser (never executed as code), then printed with your choice of indent, or minified to a single line. If it's invalid, you get the line and column of the first problem in plain words: a trailing comma, a missing quote, single quotes instead of double, and so on.
Use it for API responses, config files, package.json, log lines and test data. Unicode such as Hindi text and emoji is kept as is. Very large numbers beyond JavaScript's precision and duplicate keys are normalised by the parser, which is worth knowing for unusual files.
Everything runs in your browser. Your text is never uploaded or stored, so it is safe for drafts, code and private documents.
हिंदी में मदद
JSON को पढ़ने लायक़ फ़ॉर्मैट करें, जाँचें या छोटा (minify) करें। गलती होने पर सही लाइन और कॉलम बताया जाता है। आपका डेटा ब्राउज़र से बाहर नहीं जाता।
Questions
Is my JSON sent anywhere?
No. Parsing and formatting happen in your browser, so API keys or customer data in the JSON stay on your device.
Why is my JSON invalid?
The most common causes are a trailing comma after the last item, single quotes instead of double quotes, unquoted property names and comments. The error message points to the exact spot.
Does it keep the order of keys?
Yes, keys stay in their original order. Note that if a key appears twice, only the last value is kept, as in every JSON parser.
What does minify do?
It removes all spaces and line breaks that aren't inside strings, making the JSON as small as possible for sending or storing.