Skip to JSON editor / 跳到编辑器
使用指南 / Guide+

JSON formatter and minifier

Turn compact JSON into readable, indented text, or remove formatting whitespace with one click.

Use the tool ↓

How to use this tool

How to format JSON

Paste valid JSON into the editor and choose Format. Objects and arrays are printed with two-space indentation. Choose Compact for a single-line representation, then Copy to copy the current editor content.

Formatting example

Input: {"name":"Prism","active":true}. Format separates the keys onto indented lines. Compact reverses the whitespace change. Neither action sorts keys or converts strings into numbers.

Understand conversion limits

Formatting parses the input and serializes it again. Duplicate object keys cannot be preserved; large integers beyond JavaScript’s safe integer range can lose precision. Use strings for exact large identifiers. JSONL input is converted to a JSON array when formatted.

Input and output example

Choose Format for indentation, or Compact for single-line JSON.

Input

{"active":true,"items":[1,2]}

Output

{
  "active": true,
  "items": [
    1,
    2
  ]
}
All toolsJSON formatter and minifierJSON syntax validatorQuery JSON paths and filter recordsJSON Lines viewer and converter

No sign-up required. JSON content is processed locally.

Prism
All toolsJSON formatter and minifierJSON syntax validatorQuery JSON paths and filter recordsJSON Lines viewer and converter
English简体中文