71 chars · 4 lines
Two-way sync · Edit either side and the other updates automatically.
71 chars · 4 lines
Two-way sync · Edit either side and the other updates automatically.
JSON formatter guide
Paste JSON into the formatter above to turn compact or inconsistently indented data into readable output. Choose 2 spaces, 4 spaces, or tabs, optionally sort object keys, and copy or download the result without uploading API responses or configuration data. This tool is free to use. No account or payment is required.
Last updated
JSON does not require a particular indentation style, so the formatter lets you choose 2 spaces, 4 spaces, or tabs. The selected style is applied consistently at every object and array depth.
Two spaces create compact readable output, four spaces provide wider visual separation, and tabs follow editors or codebases that prefer tab-based indentation.
The formatter parses the complete document and serializes the same JSON values with consistent whitespace. Strings, numbers, booleans, null values, nested objects, and array order keep their parsed meaning.
Object keys remain in their parsed order unless Sort keys is enabled. Key sorting is recursive, while array items stay in their original order.
Formatting, validation, file import, key sorting, and Unicode decoding run in your browser. Pasted payloads and imported files are not sent to a VetaTool processing server.
Large inputs pause automatic recalculation and wait for you to start processing, which avoids repeatedly parsing the document while it is still being edited.
Compact JSON becomes readable with consistent indentation while the object values and array order remain unchanged.
{"user":{"name":"Ada","active":true},"roles":["admin","editor"]}{
"user": {
"name": "Ada",
"active": true
},
"roles": [
"admin",
"editor"
]
}Common questions
No. Formatting, syntax checks, file imports, key sorting, and Unicode decoding run locally in your browser.
Yes. Choose the indentation style from the JSON toolbar before copying or downloading the formatted output.
Formatting adds consistent indentation and line breaks for readability. Minifying removes unnecessary formatting whitespace to create compact JSON.
Sorting changes object property order recursively but preserves each parsed value and keeps array item order unchanged.
Looking for broader references? Browse all developer guides.
Debugging a specific JSON issue? Browse JSON troubleshooting.