GreyScript AI

JSON Formatter and Validator

Paste JSON to validate it, pretty-print it with your chosen indent, sort its keys, or minify it. Invalid JSON is pointed out with the exact line and column.

Your JSON
Options
Result
Parsing and formatting run entirely in your browser using the JavaScript engine's built-in JSON parser. Nothing you paste is sent anywhere or saved.

Questions and answers

Why does it say my JSON is invalid?

The formatter uses the browser's own JSON parser and reports the exact line and column where parsing failed. The most common causes are a trailing comma after the last item, single quotes instead of double quotes, or an unquoted key.

Does formatting change the data?

No, unless you turn on key sorting. Formatting only changes whitespace: indentation and line breaks. The values, key order (unless you sort) and data types stay exactly as parsed.

What does minify do?

It removes all unnecessary whitespace, producing the smallest valid JSON that represents the same data. Useful for shrinking a payload before sending it, or for pasting compact JSON into a config file.

Can it handle very large JSON files?

It runs in your browser's memory, so it comfortably handles typical API responses and config files (up to a few tens of megabytes in most browsers). Extremely large files may slow down or fail depending on your device's available memory.

Is my JSON uploaded anywhere?

No. Parsing, formatting and minifying all happen locally in your browser. Nothing you paste is sent to a server or saved.