Drop a JSON string in and get it back readable and colour-coded, with any syntax error pinned to a line and column, or compressed to a single line for production. No installation, no sign-up.
Handy when an API response arrives as one unbroken line in your terminal, or when you have hand-edited a config file and the program just says the JSON is invalid without telling you where the missing comma is. The minified form is what you want when you need to paste data into a single field or variable.
Set the indent to 2 spaces, 4 spaces or a tab, drag in a .json file or type the code directly, and read the line, character and key counts under the output. Copy the result or save it as a file. The data you paste never leaves your device.
Frequently Asked Questions
How do I clean up messy JSON?
Paste the code into the input box. The tool detects what you gave it: a minified one-liner gets expanded, and already-readable JSON gets minified. You can switch manually at any time with the Beautify and Minify buttons.
How do I change the indentation?
Pick 2 spaces, 4 spaces or Tab from the menu above the output box. The output is rebuilt immediately.
How do I load a JSON file?
Drag the file onto the input box. Only the .json extension is accepted; for copied text, click the box to turn it into an editor and paste, or use the Paste button.
How do I find the syntax error?
When the input is invalid, the line and column of the problem appear under the output along with the error message. Jump to that line in the editor — the actual mistake is usually one character earlier.
What usually causes "Invalid JSON"?
A trailing comma after the last item in an array or object, single quotes instead of double quotes, an unquoted key, and an unclosed bracket or brace. If you copied the text out of a log, stray characters may be stuck to the start or end.
Are comments and trailing commas supported?
No. The JSON standard has neither, so files like tsconfig that carry comments are reported as invalid here. Strip the comments first.
Do key order and values survive untouched?
Key order is preserved as it was in the input. Numbers are rewritten in standard form, so 1.0 becomes 1 and very large integers may lose precision in their last digits. If a key appears twice, the last one wins.
How do I get the compressed output?
Minify strips every bit of whitespace and returns the JSON on one line. That is the form to copy when the data has to live inside a variable or a database field.
What is the downloaded file called?
Download saves a file named formatted.json holding exactly what the output box shows.
What does the "keys" number count?
Every key in the structure, including keys inside nested objects. It is a quick way to gauge how heavy an API response is.
What is the Sample button for?
It loads a ready-made JSON into the input so you can see how the tool behaves without bringing in real data.
Do you have a tool for HTML and CSS too?
Yes. The code beautifier handles HTML, CSS and JavaScript, and the code compressor does the opposite.
Is the data I paste stored anywhere?
No. Everything runs on your own device and neither the input nor the output is stored by us, so API responses and the tokens inside them stay with you.