JSON Formatter
Pretty-print or minify JSON and check for syntax errors.
- Runs in your browser
- No sign-in needed
Paste JSON
Result
Paste JSON and press [Format], [Minify] or [Validate only] — the result appears here.
How to use JSON Formatter
When to use
Use when JSON from an API response or config file is crammed onto one line and hard to read, or when you want to strip whitespace to minify it for transfer or storage. It also tells you right away whether the pasted JSON has syntax errors.
What to input
Paste JSON and press [Format], [Minify], or [Validate only]. Formatting uses a 2-space indent, and the result shows the top-level type, item count, max depth, and size before and after (bytes and lines).
Usage example
e.g. Formatting {"name":"Alex","tags":["a","b"]} puts each item on its own line with 2-space indentation, and minifying it again turns it back into one line. For JSON with a missing comma, [Validate only] shows the parser's error message as-is.
Things to check
Comments, trailing commas, and single-quoted strings are not standard JSON and are reported as errors. Format and minify rewrite values as JavaScript numbers, so a large integer like 12345678901234567890 becomes 12345678901234567000, and only the last value of a duplicate key is kept.
Related tools
Decode the header and payload of a JWT. The signature is not verified.
No sign-in neededRuns in your browser
Convert Excel data to CSV, JSON, or HTML for analysis, integration, and sharing.
No sign-in neededProcessed on the server
Compare an original and a revised text and highlight what was added or changed.
No sign-in neededRuns in your browser
Your input is processed only in this browser and is never sent to a server.