Tech

How to format JSON for better readability

Paste compact JSON into the formatter to add line breaks and indentation without changing its values. If formatting fails, check quotation marks, commas, and closing brackets first.

Format compact JSON right away

Paste compact data like this into the JSON formatter:

{"name":"Soul Tools","features":["format","validate"],"private":true}

Formatting preserves the values and array order while making the structure easier to scan.

{
  "name": "Soul Tools",
  "features": ["format", "validate"],
  "private": true
}

Check these errors when formatting fails

JSON requires double quotation marks around property names and string values. Standard JSON does not allow comments or a comma after the final item.

  • A trailing comma after the last property or array item
  • Single quotation marks instead of double quotation marks
  • A missing comma between properties or array items
  • An unclosed string, brace, or bracket
  • JavaScript comments inside the JSON

The actual mistake may appear just before the position shown in the error message.

Remove sensitive values before sharing

Configuration files and API responses can contain tokens, email addresses, or customer data. Soul Tools processes JSON in your browser and does not upload the text to our server. Even so, remove secrets from anything you share, keep the original input until validation succeeds, and test the final JSON in the application that will use it.

Frequently asked questions

Does formatting JSON change its values?

No. A formatter changes whitespace and indentation while preserving property values and array order.

Can JSON contain comments?

Standard JSON does not support comments. Remove JavaScript-style comments before validating it.

viewsToday Total