Tool Wizard

JSON Formatter

Indentation:
Choose no indentation, 2 spaces, or 4 spaces.

Remove properties and array items with default values (null, 0, false, empty string, empty array or object), including nested values. Remove null-valued properties and array items, including nested values. Already included when Remove Default Values is selected; your null-only choice is restored when it is turned off.

Cleanup also removes array items. Remove Default Values includes null removal.

JSON Formatter guide

Format, clean, and beautify JSON. Supports custom indentation and removing default or null values. Trailing commas and comments are accepted.

Input and limitations

Valid JSON. Trailing commas and comments are allowed.

Check the selected options before using the result. Formatting and conversion do not establish that data is safe or suitable for your application.

How to use JSON Formatter

  1. Paste your JSON into the Enter JSON field.
  2. Choose your options above.
  3. The formatted JSON appears on the right.
  4. Use the copy button to copy the result.
  5. Click Clear to empty the input and output; your options stay selected.

Example

Paste {"name":"Ada","items":[1,2]} and select 2-space indentation to see an indented object and array.

Privacy on the website

The website uses Blazor Auto: interactive processing can run on the server or in your browser, depending on the current session. Do not assume pasted input stays on your device. Use non-sensitive sample data, and never place passwords, tokens or personal data in page URLs.

Search indexing covers public tool descriptions, not your input or generated output. See the privacy policy for website analytics and other data handling.

Rejoining the server...

Rejoin failed... trying again in seconds.

Failed to rejoin.
Please retry or reload the page.

The session has been paused by the server.

Failed to resume the session.
Please retry or reload the page.