JSON Formatter
Format and indent valid JSON in your browser, with downloadable output and clear syntax errors.
Loading tool…
How to use JSON Formatter
Turn compact JSON into readable, consistently indented data. Arrays, objects, Unicode, and primitive JSON values stay on your device.
- Paste a JSON document.
- Choose an indentation style and run the formatter.
- Copy the formatted result or download the JSON file.
Good to know
- Standard JSON only: comments, trailing commas, and unquoted keys are invalid.
- Up to 200,000 input characters, 20,000 source values (including containers and repeated members), and 60 nesting levels; at most 2,000,000 output characters.
- Number spellings and property order are preserved as text, without numeric calculation. Other applications may round or reject large numbers; use strings for identifiers. Duplicate object members remain present, while many consumers retain only their last value.
Format a record without rounding its account ID
Keep account IDs in JSON strings for interoperability. This formatter also preserves unquoted numeric tokens, but another parser or spreadsheet may round them. Paste this record, select 2 spaces, and run the tool; the quoted ID stays intact while the layout changes.
JSON input · 2-space indentation
{"account_id":"9007199254740993","active":true}Formatted JSON
{
"account_id": "9007199254740993",
"active": true
}- Use straight double quotes around keys and string values. Comments and trailing commas are not valid JSON.
- Numeric tokens are preserved as supplied. Formatting cannot recover digits already rounded before you paste the document.
- Repeated object members remain present and in source order. Many other parsers keep only the last value; use unique keys for interoperable records.
Common questions
Is the JSON uploaded?
No. Parsing and formatting run inside your browser.
Will this preserve the original source text?
Only whitespace is changed for valid Unicode text. Numeric tokens, existing string escapes, property order, and repeated members are preserved. Raw unpaired UTF-16 surrogates are written as Unicode escapes so downloads remain valid UTF-8.
Keep going with related tools
All developer →JSON Validator
Check JSON syntax locally and see its root type, value count, and nesting depth.
DeveloperJSON Viewer
Inspect a JSON document as a safe path, type, and value tree without executing its contents.
DeveloperJSON to CSV
Convert JSON records into quoted CSV while retaining original number text and spreadsheet formula protection.
DataJSON Key Sorter
Sort object properties throughout a JSON document while retaining array order.
DataJSON Minifier
Remove JSON whitespace without rounding numeric tokens or changing property order.
DeveloperJSON to XML
Convert JSON into escaped, typed XML while preserving arbitrary object keys and array ordering.