JSON Beautifier
Pretty-print JSON with syntax highlighting.Files stay on your device.
OUTPUT: BEAUTIFIED
// A compact payload, beautified
IN
{"name":"Tom","age":30,"tags":["dev","ops"],"active":true}
OUT
{ "name": "Tom", "age": 30, "tags": [ "dev", "ops" ], "active": true }
Keys keep their original order unless [sort keys] is on. [copy] and [Download] take this text without the line numbers or colors.
// What the controls change
- >--indent — 2 spaces, 4 spaces or Tab. Changing it re-runs the beautify with the current input.
- >[sort keys] — Sorts object keys by name at every depth. Arrays keep their original order, numbers keep their original text, and numeric-looking keys follow JavaScript’s own key order.
- >[BEAUTIFY] — Parses one strict JSON value. Invalid input shows the parser message and a short excerpt of the input instead of a partial result.
- >[line no] / [hide lines] — Shows or hides line numbers in the preview. The copied and downloaded text never contains line numbers.
- >[fullscreen] / [exit] — Expands INPUT and OUTPUT to fill the window. Press Escape or click [exit] to leave fullscreen.
- >[OPEN FILE] — Reads a local .json file into INPUT and beautifies it. The file is read in this browser tab.
- >[copy] / [Download] — Takes the indented plain text. The syntax colors are only a preview and are not part of the result.
// If you need a different JSON tool
- >JSON Formatter — inspect the JSON as a foldable tree and edit a key or value in place
- >JSON Compress & Escape — go the other way and minify or escape the payload
- >JSON5 to JSON — convert a config with comments or trailing commas into strict JSON first