JSON Formatter
Beautify and pretty-print JSON with consistent indentation.
Your data is processed entirely in your browser and is never uploaded.
Tool workspace
Drag & drop file here or browse
Options
Produces deterministic output; array order is preserved.
Format JSON in three steps
Paste or upload
Drop in raw, minified, or messy JSON, up to 15M characters.
Pick indentation
Choose 2 spaces, 4 spaces, or tabs, and optionally sort keys A→Z.
Format & export
Click Format, then copy or download the beautified result. All offline.
What formatting does (and cannot do)
Formatting is parse, then re-serialize: the engine reads your JSON into memory and writes it back out with consistent indentation, so a cramped one-liner becomes something a human can scan. Because it parses first, it *cannot* repair broken JSON. If the input is invalid you get the exact error instead of a guess, and the right move is to validate and fix it, then format. Minifying is the same operation in reverse (indentation set to zero), which is why the two tools share an engine. Large documents format in a background worker so the editor never locks up.
Things to know
Invalid input won't format
The formatter reports the line and column of the problem rather than silently producing wrong output. Fix the syntax (the Validator pinpoints it) and format again.
A trailing comma breaks it
Because formatting parses first, the same trailing-comma mistake that breaks validation breaks formatting too. Load this and you'll see the error, not a pretty result.
{
"name": "Ada",
"role": "engineer",
}Sort keys reorders, never rewrites
Enabling sort-keys reorders each object's properties alphabetically for stable diffs. Values are untouched and array order is always preserved.
Indentation is a display choice
2-space, 4-space, and tab produce identical data with different whitespace. Pick whatever the file you're pasting into expects.
Try these
{"name":"Ada","role":"engineer","tags":["pioneer","writer"],"active":true}A single cramped line. Watch it expand into readable structure.
{"a":{"b":{"c":[1,2,3],"d":true}}}Indentation stays correct at any depth.
pair this withValidate it → JSON Validator·Shrink it → JSON Minifier·Compare versions → JSON Diff
Go deeper
Frequently asked questions
Is my JSON uploaded anywhere?
No. Formatting happens entirely in your browser. Your data never leaves your machine.
What does "sort keys" do?
It reorders every object's properties alphabetically for deterministic output. Handy for diffing. Array element order is always preserved.
Can it validate JSON too?
Yes. If the input isn't valid JSON, the status bar shows the parse error with its position. A dedicated JSON Validator with richer diagnostics ships in v1.2.
How do I make minified JSON readable?
Paste the minified JSON here and click Format. To go the other way, from readable to compact, use the JSON Minifier.
Can I format JSON in Chrome without an extension?
Yes. This tool runs entirely in your browser tab, so there is nothing to install and no extension permissions to grant. Just paste your JSON and format.
What is JSON mostly used for?
JSON is the standard format for API responses, configuration files, database exports, and data interchange between frontend and backend systems. Seewhat JSON is used for for the full breakdown.
Does formatting change my data?
No. Only whitespace and line breaks change. Keys, values, and array order are preserved exactly.
How do I format a JSON file?
Drop the file or paste its contents and click Format. In VS Code use Format Document or jq . file.json. See How to Format a JSON File.