Developer tool

JSON Formatter Online

Pretty-print JSON to make it readable, or minify it into compact JSON. Invalid syntax is reported so you can fix the input.

← Back to all tools

Your result will appear here.

Free online JSON formatter and validator

JSON (JavaScript Object Notation) is a text format commonly used to exchange data between websites, applications and APIs. When JSON is compressed onto one line, nested objects can be difficult to inspect. This free JSON formatter makes valid JSON easier to read with indentation, or reduces it to a compact string with minification.

What this tool does

How to format JSON

  1. Copy your JSON data from a file, API response or code editor.
  2. Paste it into the Your text box.
  3. Choose Pretty print to format it or Minify to compact it.
  4. Click Run tool. If the input is valid, the formatted result appears below.
  5. Use Copy result to copy the output.

Example

Input JSON: {"name":"Asha","city":"Pune","active":true}

Pretty-printed output:

{
  "name": "Asha",
  "city": "Pune",
  "active": true
}

Minified output: {"name":"Asha","city":"Pune","active":true}

Common JSON errors

Frequently asked questions

Does formatting change my JSON data?

Pretty printing changes whitespace and indentation, not the represented values. Minifying also removes unnecessary whitespace. Always review important output before using it in production.

Can this tool fix invalid JSON automatically?

No. It reports a parsing error to help you locate a problem, but you must correct the input yourself.

Is my JSON uploaded?

Formatting and parsing happen in your browser. The JSON text is not sent to Tolvix for processing. Avoid pasting secrets into any website and review the Privacy Policy · Terms.

Explore related developer tools

Continue working with data using the JSON to CSV Converter, CSV to JSON Converter, Base64 Encoder & Decoder or URL Encoder & Decoder.