How can I format JSON?
Paste JSON, choose indentation and click “Format”.
Format, validate and minify JSON for free – no sign-up, with file upload, clear error display and local processing in your browser. Your data is not stored.
Your JSON data is processed directly in your browser. It is neither transmitted nor stored.
Your JSON data is processed locally in your browser only and is not stored.
Drop a JSON file here or select one (.json, .txt)
Sorting changes the order of object keys. Arrays remain unchanged.
$
JSON (JavaScript Object Notation) is a text-based, language-independent data format used for APIs, configuration and data exchange.
A JSON formatter makes compact JSON readable with indentation and line breaks – pretty print.
A validator checks whether text is syntactically valid JSON and shows errors clearly.
Minifying removes unnecessary whitespace and line breaks without changing the data structure.
JSON supports objects, arrays, strings, numbers, booleans and null.
JSON requires double quotes for keys and string values. Single quotes are not allowed.
No. The JSON standard does not support comments like // or /* */.
There must be no comma after the last element in an object or array. Example: {"a":1,} is invalid.
JSON is stricter than JavaScript object literals. Unquoted keys, functions or undefined are not allowed in JSON.
No. Processing happens entirely locally in your browser.
Paste JSON, choose indentation and click “Format”.
Use “Validate” or automatic validation while typing.
Formatting makes JSON readable. Minifying removes whitespace for compact output.
Common causes are single quotes, trailing commas, missing brackets or comments.
No. JSON requires double quotes.
No. Comments are not part of the JSON standard.
No. There must be no comma after the last element.
No. Strings, numbers, booleans, null or arrays are also valid JSON.
Yes. An array on its own is fully valid JSON.
Yes. Example: 42 is valid JSON.
No. Everything happens locally in your browser.
Yes. .json and .txt files can be loaded locally.
Yes. Output can be downloaded as a .json file.
Yes. Enable “Sort object keys alphabetically”.
It describes how deeply objects and arrays are nested inside each other.
Yes, up to 10 MB. Larger files are rejected.
JSON5 allows comments, single quotes and trailing commas. This tool supports standard JSON only.
No. It provides hints but does not auto-repair.
Yes. Unicode in strings is handled correctly.
Yes. JSON is only parsed and displayed as text – never executed.
Sign up once – keep everything in view!