JSON Formatter — FAQ

Back to the tool

Frequently asked questions

Is this JSON formatter safe to use with private data?

Yes. Your input is parsed and reformatted by JavaScript running in this tab. There is no upload, no server-side processing, and nothing about what you paste is logged — useful when the JSON contains tokens, customer records, or anything else you would not send to a random tool.

Will it tell me where my JSON is broken?

Yes. When the parser rejects your input, the status line shows the line and column of the error and the parser's message (Unexpected token, Unterminated string, and so on), so you can jump straight to the offending character.

Can I minify JSON with the same tool?

Yes. Pick Minify in the indent selector and the output pane shows the smallest valid version of the document — no whitespace, no line breaks — which is what you want before embedding JSON in a URL, query string, or HTTP header.

How large a payload can it format?

It is limited only by your browser's memory. In practice, anything up to a few megabytes pretty-prints instantly. Very large documents (tens of megabytes) may briefly freeze the tab while the browser parses them, but the work still happens locally.

Does it support JSON5 or JSONC (files with comments)?

No. Standard JSON has no comment syntax, and the formatter uses the browser's built-in JSON.parse which enforces the spec strictly. If your file uses // comments (JSONC, used in VS Code config files) or unquoted keys and trailing commas (JSON5), you will need to strip those before pasting. The tool will report "Unexpected token" at the first comment or non-standard character.

Does it sort keys alphabetically?

No. JSON.stringify preserves key order exactly as it appears in the input. If you need sorted output, you would need a tool specifically built for that — JSON key sorting requires either recursive comparisons or a custom replacer function that is not part of this formatter's scope.

Why are my large numbers coming out wrong?

JavaScript numbers are 64-bit floating-point (IEEE 754), which can only represent integers exactly up to 2⁵³ − 1 (about 9 quadrillion). Integers larger than that lose precision when parsed. If your JSON contains large identifiers or snowflake IDs that look like 64-bit integers, the round-trip through JSON.parse / JSON.stringify will corrupt them. This is a JavaScript limitation, not a tool limitation.

Does it work offline?

Yes, once the page has loaded. The formatter is a small static page with no runtime API calls, so it keeps working on a plane, on a locked-down network, or after you disconnect from Wi-Fi.