JSON Formatter

Format valid JSON with two-space indentation, remove unnecessary whitespace or check whether pasted JSON can be parsed.

How to use JSON Formatter

  1. Paste JSON into the text input.
  2. Select Format for two-space indentation, Minify for compact output or Validate for a syntax check.
  3. Read any parsing error; correct the input before running the selected action again.
  4. Review number precision before copying JSON containing large integer identifiers.

A practical example

{"name":"Auvatrix","active":true} → indented JSON

Limitations and common mistakes

JSON needs double-quoted keys, no comments and no trailing commas. Large numeric values can lose precision in JavaScript.

Questions about JSON Formatter

Does validation check a JSON Schema?

No. Validate checks whether JSON.parse can parse the input; it does not validate against a JSON Schema.

Can I format comments or trailing commas?

No. Supply JSON with double-quoted keys, no comments and no trailing commas.

Can formatting change large integers?

Yes. Parsing uses JavaScript numbers; integer values beyond the safe integer range can lose precision. Store precision-sensitive identifiers as strings where appropriate.

Supported input and output

JSON text with double-quoted keys and strings; comments and trailing commas are not accepted.

Formatted JSON, compact JSON or a validation message, depending on the selected action.

Practical guides

Related Developer tools

Browse Developer tools