What is JSON Formatting?
JSON formatting adds proper indentation and line breaks to compact JSON, making it readable for humans. Minified JSON like {"name":"Ravi","age":28} becomes:
{
"name": "Ravi",
"age": 28
}How to Format JSON in One Click
1. Open the JSONKit Formatter at /json-formatter 2. Paste your raw or minified JSON into the left input panel 3. Click Format or press Ctrl + Enter on Windows, Cmd + Enter on Mac 4. Formatted JSON appears in the right output panel instantly 5. Click Copy or Download to save your result
Indentation Options
JSONKit supports three indentation levels controlled by the 2 / 3 / 4 selector in the toolbar:
- 2 spaces — most common, used by JavaScript and most REST APIs
- 3 spaces — some Python projects prefer this
- 4 spaces — common in Java and C# projects
Changing the indent while output is already visible immediately reformats without clicking Format again.
Minify from the Same Page
Click Minify to strip all whitespace and compress your JSON to the smallest possible string. This reduces bandwidth for API responses. You can switch between Format and Minify on the same input without re-pasting.
Sort Keys
Click Sort Keys to alphabetically sort all object keys at every nesting level. This is useful for comparing two JSON objects visually or producing consistent output when key order varies.
File Upload and Download
Click Upload to load a local .json or .txt file directly into the editor. Click Download to save the output as output.json. Both work entirely in your browser — no file is ever sent to a server.
Session Auto-Save
Your last input is automatically saved to localStorage. Close the tab and come back later — your JSON is still there. Click Clear to wipe the session.