Skip to content
Toolore

Developer Tools

JSON Formatter

Paste unreadable JSON to get it properly indented. If it will not parse, the error is reported with the line, column and the offending line itself — rather than a message that only tells you something is wrong somewhere.

Status

Waiting for input

Your JSON stays on your device

Parsing happens entirely in your browser. Nothing you paste is uploaded — worth knowing, since API responses often contain real customer data.

How to use this tool

  1. Paste your JSON into the box.
  2. Choose two spaces, four spaces or tabs for indentation.
  3. Copy the formatted result, or read the error if it does not parse.

Notes and limitations

  • Error positions are found by this tool's own scanner rather than by reading the browser's error message. Those messages differ between Chrome, Firefox and Safari and change between versions, so relying on them would make the tool unreliable in some browsers.
  • Key order is preserved as written. JSON objects are unordered by specification, but every mainstream parser keeps insertion order and changing it would make diffs unreadable.
  • Comments and trailing commas are not valid JSON and are rejected. If you need those, you are looking at JSON5 or JSONC, which are different formats.
  • Very large numbers lose precision, because JSON numbers become IEEE-754 doubles. An integer beyond 2^53 will not survive a round trip — this is why APIs often send large IDs as strings.
  • Everything runs in your browser and nothing is uploaded. That said, treat any third-party website with caution when handling production data — if a value would cause real damage if leaked, process it with your own local tooling instead.

Frequently asked questions

Why does my JSON say it is invalid?

The usual causes are single quotes instead of double quotes, a trailing comma before a closing brace, unquoted keys, or a comment. All four are valid JavaScript but not valid JSON. The error message points at the exact line and column.

Does formatting change my data?

No. Only whitespace changes. Keys, values and their order stay exactly as they were.

Can JSON contain comments?

No. The specification has no comment syntax. JSON5 and JSONC add them, and some parsers accept them as an extension, but standard JSON will reject them.

Why did my large ID number change?

JSON numbers are parsed as double-precision floats, which hold integers exactly only up to 2^53 − 1. Anything larger is rounded. That is why well-designed APIs send big identifiers as strings.