JSON Formatter
Make JSON readable and find syntax errors on your device.
Paste JSON or open a file to format and check it.
Example · Trail details
Large input preview. Paste again, open a file or clear the input to replace it.
Valid JSON
{
"name": "Lake Morrow",
"tags": [
"park",
"trail"
],
"open": true
}
Object
- "name" · "Lake Morrow"
"tags" · Array
- [0] · "park"
- [1] · "trail"
- "open" · true
Showing the start of the result. Copy or download the full output.
The JSON is ready with two-space indentation.
Processed on this device — nothing is uploaded
What you can do here
- Line and column errors
- Spaces or tabs
- Minify JSON
- Sort object keys
- Browse an expandable tree
- Copy or download JSON
What does a JSON formatter do?
A JSON formatter adds indentation and line breaks so you can see how objects and arrays fit together. Choose two spaces, four spaces or tabs for readable output. Use Minify for compact output or check the reported line and column if the source contains a syntax error.
A JSON formatter makes nested objects and arrays easier to read by adding line breaks and indentation. Paste a document such as {"id":7,"tags":["a","b"]} or open a local file, then choose two spaces, four spaces or tabs. Minify removes formatting whitespace while preserving characters inside strings. Sort keys orders object properties and leaves array items as they were. If the input is broken, use the reported line and column to find the missing comma, quote or bracket.
Key facts
- Price
- Free
- Sign-up
- None
- Upload
- None — runs on your device
- Limits
- 8 MiB input · 512 levels of nesting · 24 million characters of output
- Works with
- Pasted JSON or a local UTF-8 JSON file · Objects, arrays and top-level scalar values
- Output
- Indented or minified JSON · Expandable tree view · Syntax errors with line and column
- Updated
How do you format and validate JSON?
- Paste JSON or open a file
Use the text box or choose a UTF-8 file up to 8 MiB.
- Choose indentation or minify
Pick two spaces, four spaces, tabs or Minify. Turn on Sort keys to order the properties.
- Check and save the result
Fix the line and column shown for any syntax issue. Copy the valid result or download a JSON file.
Which JSON format should you choose?
Indentation is helpful for reviewing nested values. Minification is useful when a compact representation matters. Both preserve whitespace within quoted strings.
| Option | Result |
|---|---|
| 2 spaces | Compact, readable indentation |
| 4 spaces | Wider indentation for scanning |
| Tabs | One tab per nested level |
| Minify | Compact text on one line |
Frequently asked questions
How do I find a missing comma in JSON?
Look at the reported line and column, usually at the start of the next property or array item. Add a comma after the preceding value.
Does formatting change large numbers or duplicate keys?
Formatting keeps number spellings, including large integers and exponents. It also keeps repeated property names, which other JSON readers may interpret differently.
What does Sort keys change?
It sorts decoded property names within each object, including nested objects. Array item order stays the same.
Is my JSON uploaded when I open a file?
The page reads and formats the file on your device. Your JSON and filename are excluded from analytics.
How large can my JSON input be?
You can paste or open up to 8 MiB. Large documents use shortened previews. Copy and Download still return the complete result.
Popular conversions
Related tools
About this tool
Made by ZirkoMirko. Last updated .
Check it yourself in your browser’s Network panel while using the tool. How we handle your data.
Sources
- RFC 8259, The JSON Data Interchange Format (checked )