Format JSON

Make valid JSON readable with consistent indentation.

Local processing · Nothing is uploaded · 1 MB input limit

Input & settings

Paste text or drop a UTF-8 text file
Ready. Enter your input to begin.

How to use this tool

Paste JSON, choose two or four spaces, then format it. Download the result as a JSON file.

Limits and behavior

Formatting preserves numeric text and duplicate keys. Comments, trailing commas, numbers outside the safe integer range, and nesting beyond 128 levels are rejected. Input is limited to 1 MB and output to 3 MB. No input content is saved by CraftAI.

JSON formatter and pretty-printer

Paste a JSON object or array to make valid JSON easier to read. This online JSON beautifier and pretty-printer adds consistent indentation without changing the underlying data values. Choose two- or four-space formatting.

Will a JSON formatter repair broken syntax?

No. Formatting requires syntactically valid JSON. If the input contains missing commas, unmatched brackets or invalid quotes, correct the JSON syntax before formatting.

Worked example: make compact JSON readable

Paste {"b":2,"a":[1,true]}, choose two-space indentation and select Format JSON. The output places the keys and array elements on separate, indented lines while retaining the same data. It does not reorder keys alphabetically or change their values.

What happens if the input is invalid?

Input such as {invalid json produces a syntax error, not a fabricated result. Check quotes, commas and closing brackets before trying again. For syntax checking without changing the layout, use Validate JSON.

Never paste credentials, personal records or other confidential content into tools unless your own handling policy allows it, even when processing occurs locally.

Worked example and important checks

For a compact object such as {"name":"Mira","active":true}, selecting two-space indentation produces a multi-line object with "name": "Mira" and "active": true. The content stays JSON; spacing changes, but data should not be guessed or repaired.

When the input is invalid (for instance, a missing quotation mark), review the reported error and fix the source rather than assuming a formatter can infer the intended values.

Read the JSON formatting tutorial →

Built on Hatchable