JSON Formatter and Validator
Beautify compact JSON, minify formatted JSON, or check syntax. Processing happens in your browser; the formatter code does not upload the text you enter.
How to format and validate JSON
JSON (JavaScript Object Notation) is a text format for structured data used by APIs, configuration files, and web applications. Paste a JSON value above and choose Format & validate to check its syntax and add indentation, or choose Minify to remove insignificant whitespace.
- Paste or type a JSON object, array, string, number, boolean, or null.
- Choose an indentation style and format the input, or minify it for compact output.
- If JSON is invalid, review the error and line/column hint, correct the input, then run it again.
- Copy the output when it is valid. The input remains in this page until you clear or leave it.
Example
The compact input {"name":"Mina","items":[1,2]} becomes readable on separate lines when formatted. Minifying reverses the whitespace change; it does not rename fields or alter values. JSON strings require double quotes, object keys must be quoted, and trailing commas are not allowed.
Need to work with ordinary prose instead? Try our word counter or text case converter.
Frequently asked questions
What does a JSON formatter do?
It parses valid JSON and prints the same data with consistent whitespace, making nested objects and arrays easier to inspect.
How do I validate JSON online?
Paste the complete JSON value and select Format & validate. A successful result appears in the output area; invalid syntax produces an error message.
How do I minify JSON?
Select Minify to remove formatting whitespace. The resulting compact JSON keeps its data values and structure.
Why is my JSON invalid?
Common causes include single quotes, unquoted object keys, a missing comma or bracket, and a trailing comma. JSON requires double-quoted strings and keys.
Is my JSON uploaded or stored?
The formatter and validator run in the browser and their code does not send the entered JSON to a server. Avoid using sensitive data in a shared device or a page you do not trust.
Can the formatter repair broken JSON?
No. It reports a parsing error but does not guess at a correction. Fix the source deliberately so that values are not changed unexpectedly.