Skip to content

Format JSON

Make JSON easier to read with consistent indentation. Format and download it locally in your browser.

0 / 100,000 characters
2-space indentation
Nothing leaves this page

How it works & useful details

Readable JSON in one step

Paste valid JSON, select Format JSON, then copy or download the result. The first run loads the Nodepod browser runtime; processing stays on your device.

What to expect

Up to 100,000 characters. Comments and trailing commas are not valid JSON. Numbers use JavaScript precision, duplicate object keys keep their last value, and object key ordering may change. Keep your original when these details matter.

Powered by Nodepod. License and attribution.

About this tool

Format JSON indents a JSON document so it can be read and reviewed comfortably. It performs strict parsing first, so invalid JSON is reported with a clear error instead of being partially formatted.

Formatting runs locally. The output is a text document you can copy or download, with consistent indentation applied to the whole structure.

How to use it

  1. Paste the JSON document.
  2. Run the formatter and let parsing validate the input.
  3. Read any syntax error and fix the document if needed.
  4. Copy or download the formatted JSON.

Worked example

Minified JSON from an API response,

{"id":42,"tags":["new","sale"],"price":{"amount":19.99,"currency":"EUR"}}

is formatted with consistent indentation:

{
  "id": 42,
  "tags": ["new", "sale"],
  "price": {
    "amount": 19.99,
    "currency": "EUR"
  }
}

The data itself is unchanged: formatting only adds whitespace between tokens.

When formatting fails

The formatter only accepts valid JSON. The most common problems are comments (// or /* */), trailing commas after the last item, single-quoted strings, unquoted keys, and values such as NaN or undefined. These are all allowed in JavaScript but not in JSON. Configuration files like tsconfig.json or VS Code settings use JSONC, a JSON-with-comments variant, and will be rejected until the comments are removed.

The JSON validator reports the document’s structure, depth, and number-range problems once the syntax is fixed. Keep your original when exact details matter: very large integers lose precision, and when a key appears twice, only its last value is kept.

Frequently asked questions

Does formatting change the data?

No. Whitespace is rewritten; values and key order are preserved. Duplicate keys follow standard JSON parsing behavior.

Can it repair broken JSON?

No. It validates and formats; it does not guess at missing braces or quotes.

What is the limit?

Up to 100,000 characters of JSON text in this workspace.

Why does the first run take a moment?

The formatter runs in a small Node-compatible runtime (Nodepod) inside your browser. It loads once on first use; later runs are immediate, and nothing is uploaded.