About this tool
About JSON Formatter
Paste JSON to make compact objects and arrays easier to read. The formatter uses standard JSON parsing and two-space indentation, then lets you copy the result or download a .json file. Use Try sample to explore the input and output before working with your own data.
How to format JSON
- Paste JSON or import a .json file up to 10 MB.
- Select Run tool, or press Ctrl/Command + Enter.
- Correct any syntax error while keeping your source text.
- Copy the formatted result or download the JSON file.
Editing the source clears the previous output. Run the tool again before using or downloading the revised result.
Strict JSON, comments and trailing commas
JSON requires double-quoted property names and strings. Comments, trailing commas and JavaScript expressions are not valid JSON and are not silently repaired. Use the JSON Validator for a focused syntax check, or the JSON Minifier when the final file should have less optional whitespace.
Number precision and duplicate keys
This workflow parses and serializes values using JavaScript. Very large integers can lose precision; duplicate object keys retain the last value. Keep the original when exact numeric identifiers or duplicate entries matter. Formatting also does not validate your application's schema or business rules.
Continue with structured data
Open JSON to CSV for a suitable tabular export, JSON to YAML for a YAML representation or JSON to XML for an XML workflow. If your source is a table, start with CSV to JSON before formatting. Check nesting and data types after a format conversion.
Local processing
Your source is processed in this browser during the normal workflow. Large pasted data can use substantial memory. Review the complete output before replacing important files.
