JSON formatter and validator
Format, validate, and minify JSON in your browser. Errors point at the line and column. Nothing is sent to a server.
Formatted
{
"tool": "Pikkit JSON formatter",
"runsOn": "your device",
"uploads": false,
"features": [
"format",
"validate",
"minify"
],
"limits": {
"files": 0,
"accounts": 0
}
}Valid JSON · object · 5 keys · 201 characters out
How to use the JSON formatter
Paste a wall of JSON and get it back indented and readable, or squashed to one line for a config field. Invalid JSON is reported with the line and column where the parser gave up, rather than a bare “unexpected token”.
Paste the JSON
An API response, a config file, a log line — anything that should parse. Formatting runs as you type.
Choose indentation
Two spaces, four spaces, or tabs. Sort keys alphabetically when you are diffing two payloads that list their fields in different orders.
Copy or minify
Copy the formatted output, or switch to minified to strip every space before pasting it somewhere that wants one line.
About this tool
JSON has no comments, no trailing commas, and no single quotes. Almost every parse failure is one of those three, plus the occasional smart quote pasted in from a document. Reading the character position in the error is faster than scanning the whole payload.
Minifying is worth doing for anything travelling over a network or into an environment variable, and worth undoing the moment you need to read it. Neither direction changes what the data means.
Frequently asked questions
- Is my JSON sent anywhere?
- No. It is parsed by the browser’s own JSON parser in this tab. That matters when the payload has API keys, customer records, or an access token in it — which is most of the time, and the reason to avoid formatters that post to a server.
- Why does my JSON not parse?
- Usually a trailing comma after the last item, single quotes instead of double, an unquoted key, or a stray comment. All four are legal JavaScript and none are legal JSON. The error message here points at the line and column so you can see which.
- Can it handle a large file?
- Several megabytes are fine — it is your machine doing the work, and there is no upload to wait through. Very large payloads may pause the tab for a moment while the parser runs.
- Does formatting change my data?
- Only its whitespace, plus key order if you turn on sorting. Numbers are re-emitted by the same parser your code uses, so a value that loses precision here would lose it in your program too.