datapry

JSON Formatter

Beautify JSON with consistent indentation, without changing any values. Runs in your browser, so nothing is uploaded.

Indent

JSON input

Formatted JSON

Waiting for input

About this tool

Paste a minified API response or a messy config and get readable, consistently indented JSON. Most formatters run your text through JSON.parse first, which quietly rounds large numbers and drops duplicate keys. This one works on the original tokens, so only the whitespace changes.

How to use it

  1. Paste JSON or import a file on the left.
  2. Choose an indentation style.
  3. Copy the formatted result or download it.

Example

Input
{"id":12345678901234567890,"tags":["a","b"]}
Output
{
  "id": 12345678901234567890,
  "tags": [
    "a",
    "b"
  ]
}

The 20-digit ID stays exact. JSON.parse would round it to 12345678901234567000.

Questions

Will formatting change my data?
No. Numbers, string escapes and key order are kept exactly as written, and only whitespace changes. If your JSON has duplicate keys, both are kept and you get a warning.
Is my JSON sent to a server?
No. Formatting runs in a Web Worker in your browser, and the site's security policy blocks pages from sending data to other sites.
Why does it reject my file?
The formatter only accepts strict JSON. Comments, trailing commas and single quotes aren't valid JSON, and each is reported with its line and column so you can fix it.