Paste a JSON response, config file or log line and this formatter turns it into neatly indented, readable JSON in one click. If the JSON is broken, the validator tells you what went wrong and on which line and column, and puts the cursor right on the problem so you can fix it.
Switch to the tree view to fold and unfold large objects, sort keys alphabetically to compare two payloads, or minify the result to the smallest valid form before you ship it. Parsing happens in your browser, so API responses with customer data or access tokens never leave your computer.
How to use the JSON Formatter tool
- Paste your JSON into the input box. Pasted JSON is formatted automatically.
- Pick an indent of 2 spaces, 4 spaces or tabs, and tick Sort keys if you want keys in A→Z order.
- Press Format to beautify or Minify to remove all whitespace.
- If there is an error, read the line and column in the red message and fix the highlighted spot.
- Use the Tree tab to explore nested data, then Copy or Download .json.
Why use ToolOrca JSON Formatter
- Pretty-print with 2 spaces, 4 spaces or tabs
- Error messages with line and column
- Collapsible, colour-coded tree view
- Recursive key sorting
- One-click minify and download
- Nothing is sent to a server
Common JSON syntax errors and how to fix them
Trailing commas. JSON does not allow a comma after the last item, so [1, 2, 3,] and {"a": 1,} are invalid. Delete the final comma.
Single quotes and unquoted keys. JavaScript accepts {name: 'Ann'}, but JSON requires double quotes around every key and string: {"name": "Ann"}.
Comments, NaN and undefined. Standard JSON has no comments and no NaN, Infinity or undefined values. Remove comments and use null or a number instead.
Unescaped characters. Line breaks, tabs and double quotes inside a string must be escaped as \n, \t and \". A raw line break inside quotes is the most common reason a copied log line will not parse.
Formatted vs minified JSON
Formatted (pretty-printed) JSON adds line breaks and indentation so people can read it. Minified JSON removes every optional space, which typically shrinks a file by 10–30% and is what you want in production APIs and config bundles. Both forms contain exactly the same data.
Frequently asked questions
Is it safe to paste private JSON here?
Yes. The formatter uses your browser’s built-in JSON parser and does not upload anything, so tokens, keys and personal data stay on your device.
How do I find the error in my JSON?
Click Format. If the JSON is invalid, a red message shows the line and column of the first problem, often with a hint such as “remove the trailing comma”, and the cursor jumps to that position.
Can it format very large JSON files?
Yes. Files of several megabytes format in about a second on a normal laptop. For very large files the text view is faster than the tree view.
Does sorting keys change my data?
No. Object key order has no meaning in JSON, so sorting only changes how it looks. Arrays keep their original order.
Does it support JSON with comments (JSONC or JSON5)?
No. It validates strict JSON as defined by RFC 8259. Remove comments and trailing commas first, and the validator will point out anything that is still not standard.