JSON Formatter
JSON Formatter — runs in your browser. Inputs are not stored.
JSON format · minify · validate
Input is processed only in the browser and is not sent to a server.
How to use
- Paste a raw object into the JSON input.
- Press Pretty to make it readable with two-space indent.
- Press Minify to fill result with one line and no spaces.
- Validate checks syntax only; on pass, a pretty form also appears in the result.
- To send to the clipboard, Copy result; to clear the fields, Reset.
Key concepts
The JSON formatter is a developer tool for indenting a one-line object such as an API response or config file so humans can read it, or minifying by removing spaces for transport and logs. Pretty and minify both parse syntax first, so invalid JSON with broken quotes, commas, or braces is caught as an error. Running nested fields through the JSON formatter makes missing keys easier to spot, and a long log payload unfolds into a hierarchy to speed debugging.
This JSON formatter uses the browser parser and serializer as-is, so loose syntax with comments or trailing commas is marked invalid. It does not check schema or types; it focuses on syntax and readable output. Input is handled only inside the tab, so even if a sensitive token is included it does not remain after you close the page. It is designed for a flow of pasting a one-line log and switching pretty / minify / validate. On a successful validate, pretty JSON also fills the result field so you can see syntax OK and readable output at once.
Example
Put {"name":"tvinghub","ok":true} in the input and Pretty: keys split per line. Minify shows one line with no spaces in the result. A trailing comma makes an invalid JSON message appear in the status field.
Related: JSON encoder · JWT decoder · XML formatter
Frequently asked questions
How do pretty and minify differ in the JSON formatter?
Pretty reveals hierarchy with two-space indent. Minify serializes to one line with no spaces. Both parse syntax first.
How does the formatter report invalid JSON?
If parse fails, the status field shows invalid JSON plus the browser error in red, and the result field is not updated.
Does the formatter pretty-print JSON mixed with comments?
No. Only standard syntax is accepted, so comments or a trailing comma make validate, pretty, and minify all fail.
Does the JSON formatter Validate button change the result field?
If input is valid, a “valid JSON” notice appears and a pretty form also fills the result field. On failure, only the error is shown.
Is JSON formatter input sent to a server?
No. Only JavaScript in the tab is used. Original JSON is not uploaded as a request body.
What do Copy result and Reset do in the JSON formatter?
Copy result puts the output-field string on the clipboard. Reset clears input, result, and status messages.
Last reviewed: 2026-09-04