Amufo

JSON Formatter & Validator

Paste JSON, get it formatted or minified, with validation errors pointing at the exact line and column.

Format JSON Runs in your browser · nothing is uploaded

What the validator tells you

When JSON is invalid, the message names the line and column rather than a raw character offset. That is usually enough to spot the cause without counting characters.

The four mistakes behind most errors:

SymptomCause
Unexpected token }a trailing comma after the last item
Unexpected token 'single quotes; JSON requires double quotes
Unexpected token /a comment; JSON has no comments
Unexpected token in key positionan unquoted key such as {name: 1}

All four are valid JavaScript and invalid JSON. That is the single most common source of confusion.

Format or minify

Formatting adds indentation so a human can read the structure. Minifying removes every optional space, which is what you want in a request body, a config value or an environment variable. The statistics row shows both sizes, so you can see what minifying actually saves.

Sort keys

Sorting reorders object keys alphabetically, recursively. Two API responses containing the same data in a different key order become directly comparable in a diff, which is otherwise a tedious manual job.

Why local processing matters here

JSON is the format of API payloads, and API payloads carry customer records, access tokens, internal identifiers and prices. Pasting one into a page that posts it to a server means a copy exists somewhere you do not control. This page never sends it. You can confirm that in the network tab of your browser’s developer tools.

Questions

Is my JSON sent anywhere?

No. Parsing and formatting happen in your browser with the built-in JSON parser. Nothing is transmitted, which matters because JSON payloads routinely contain customer data, tokens and internal identifiers.

Why does it reject JSON my code accepts?

This uses strict JSON. Trailing commas, single quotes, comments and unquoted keys are JavaScript object syntax, not JSON. Many parsers are lenient; the specification is not.

What does sort keys do?

It reorders object keys alphabetically at every level. Useful for comparing two API responses that contain the same data in a different order.

How large a file can it handle?

Anything your browser can hold in memory, typically tens of megabytes. Very large documents will freeze the tab briefly while parsing.