# JSON formatter and validator: run it free, or from your agent

Pretty prints or minifies JSON, sorts keys and points to the exact line and column of any syntax error.

## Prompt

Use looot to run [endpoint or job] and show me the raw answer. 1. Set up https://looot.ai/skill.md. 2. Search the catalog for the endpoint and check its price before you call. 3. Run it once with [input]. 4. Pretty print the JSON answer with 2 spaces, list the top-level keys and say which fields came back empty.

## What it needs

JSON text

## What comes back

- formatted JSON
- minified JSON
- error line and column
- key and value counts
- duplicate keys

## Endpoints and providers

None. The tool on the web page runs in the browser and calls no endpoint.

## What it costs

Nothing. The tool on the web page runs in the visitor's browser: no account, no API call and no limit per hour. The prompt above runs the same job from your own looot account with current data, billed per call.

## Read an API answer

Turn a one-line response into something you can scan.

## Find the broken comma

Get the line and column of the error in a config file.

## Minify a payload

Strip whitespace before you paste JSON into a header or an env var.

## Stable diffs

Sort keys so two versions of a file compare line by line.

## How do I format JSON?

Paste it in the box. Valid JSON is pretty printed below as you type. Pick 2 spaces, 4 spaces, tabs or minify.

## How do I find the error in invalid JSON?

The page parses JSON the way the standard defines it and stops at the first problem. It shows the line, the column and a caret under the spot, with the reason, such as a trailing comma or a key in single quotes.

## Why is my JSON invalid when JavaScript accepts it?

JavaScript object syntax allows things JSON does not: single quotes, keys without quotes, trailing commas and comments. JSON needs double quotes everywhere and no trailing commas.

## Does it change large numbers?

No. Numbers are printed exactly as written, so an id like 9007199254740993 keeps every digit. JSON.parse in a browser would round it.

## Can it sort keys?

Yes. Turn on Sort keys A to Z. Arrays keep their order, since order matters in an array.

## What about duplicate keys?

They are valid JSON syntax but most parsers keep only the last value. The page lists any duplicates it finds.

## Is my JSON sent to a server?

No. Formatting and validation run in your browser, so API keys and customer data in the JSON stay on your machine.

## Related tools

- /free-tools/json-to-csv
- /free-tools/jwt-decoder
- /free-tools/curl-to-fetch-converter

## Last reviewed

2026-10-14.
