Minified JSON, pretty-printed
Paste {"id":1,"name":"Ada","tags":["js","py"]} with indent set to 2 and click Format to get 7 lines, with id, name and tags each on their own line.
Format, beautify and minify JSON online with clean indentation — free JSON formatter.
About
Pretty-prints messy or minified JSON into readable, indented text, or squashes it back down to a single compact line.
Backend developers use it to make an API response readable before pasting it into a bug report or a Slack thread, while frontend developers use it to check that a payload's shape matches what their code expects. It's one of many free data tools on Toolapt, and like every tool here, it's free to use with no sign-up and no limit on how many times you run it.
Examples
4 worked examples
Paste {"id":1,"name":"Ada","tags":["js","py"]} with indent set to 2 and click Format to get 7 lines, with id, name and tags each on their own line.
Paste {"name":"Ada","id":1} with Sort keys A to Z turned on to get {"id":1,"name":"Ada"} — id now sorts before name.
Take pretty-printed JSON and click Minify to collapse it back to {"id":1,"name":"Ada","tags":["js","py"]} on a single line, with all whitespace removed.
Paste {"id":1, "name": } and the tool reports it as invalid JSON, showing the exact line and column where parsing failed.
FAQ
Quick answers to common questions about the JSON Formatter.
It pretty-prints JSON with your choice of indentation, or minifies it down to one compact line, with an option to sort every object's keys alphabetically.
Yes. It's free, with no sign-up, no watermark and no limit on how many times you use it.
Yes. Everything runs in your own browser using JavaScript's built-in JSON parser — nothing you paste is sent to a server.
The tool tells you it's invalid and points to the exact line and column where parsing failed, along with a snippet of the text around that position.
It reorders every object's keys alphabetically, recursively through the whole document, which makes it much easier to compare two JSON documents that should be similar but were built with keys in a different order.
Format pretty-prints the JSON with line breaks and indentation for readability. Minify strips all of that out and returns the shortest valid single-line representation.
Yes. The page is fully responsive and works on mobile, tablet and desktop browsers alike.
It relies on the browser's native JSON parser, so it follows the strict JSON spec — it won't accept JavaScript-only syntax like trailing commas, comments or unquoted keys.
Did JSON Formatter work for you?