JSON Beautifier
Make ugly JSON readable: indent, sort keys, and browse it as a tree.
From one long line to something you can read
Logs, network tabs and command-line tools hand you JSON as a single line. Paste it here, press Format (or ⌘⇧F) and it is rewritten with one property per line and consistent indentation. Turn on Sort keys to order properties alphabetically so related fields sit together and two documents line up for comparison.
Beautify and inspect at the same time
Beautified text is only half the story. Open Split view to see the same document as a collapsible tree next to the text: it shows how many items each array holds, highlights type mismatches at a glance, and lets you click any value to copy it or its path. If the pasted text is not valid JSON, the beautifier says exactly which line and column to fix instead of producing garbage.
Like every tool on TheJSON, this runs entirely in your browser. Nothing you paste is uploaded, logged or stored on a server, so it is safe to use with API responses that contain tokens or customer data.
Frequently asked questions
Is beautified JSON still valid JSON?
- Yes. The beautifier adds only whitespace, which JSON parsers ignore. Values and key order are unchanged unless you choose Sort keys.
Can I undo the beautification?
- Press Minify to collapse the document back to a single line, or use ⌘Z in the editor to undo the last change. The editor keeps a normal undo history.
What is the best indentation for readable JSON?
- Two spaces is the most common and keeps deeply nested documents from drifting off the right edge of the screen. Choose four spaces if the file belongs to a project that already uses four.