About this tool
JSON (JavaScript Object Notation) is the most common format for sending data between servers, browsers and mobile apps. It is easy for machines to read, but a response copied from an API or a log file is often one long unreadable line. This free JSON formatter turns that line into clean, indented text, and it checks the syntax at the same time so you know straight away whether the data is valid.
Paste your JSON into the input box and choose an action. Format rebuilds the document with the indentation you prefer (2 spaces, 4 spaces or tabs). Minify removes every unnecessary space and line break, which is useful when you want to shrink a payload or embed JSON in a configuration value. Sort keys orders object properties alphabetically, which makes two documents much easier to compare. The tree view lets you collapse and expand objects and arrays, so you can explore large responses without scrolling through thousands of lines.
If the input is not valid, the tool tells you what is wrong and, whenever the browser reports it, the line and column of the problem. The most common mistakes are trailing commas, single quotes instead of double quotes, unquoted property names, and missing brackets. Fix the highlighted position and run the tool again.
Everything runs locally in your browser with JavaScript. Your data is never uploaded to a server, which makes this page safe to use with tokens, internal API responses and other sensitive snippets.