# JSON formatter

> Format JSON with readable indentation.

[Open tool](https://www.toolcabana.com/or/json-formatter) · [Developer and data](https://www.toolcabana.com/or/category/developer-and-data)

Tool ID: json-formatter. Requested language: or. Description language: en. Complete guide translation: no; untranslated sections use English.

## Supported tasks (en)

Accepts strict JSON. Trailing commas, comments, single quotes and nonfinite numbers are invalid. Formatting preserves parsed values; duplicate keys follow JSON.parse semantics, so only their final value remains.

## Steps (en)

1. Type or paste your source, or load an example.
2. Change the basic settings or open Advanced mode to fine-tune the result.
3. Review and copy or download your result. Pause Live results to run manually. Sources or individual settings above 20,000 characters require an explicit run.

## Settings

- Indent spaces (en; key: indent; type: number); minimum: 1; maximum: 8
- Sort object keys alphabetically (en; key: sortKeys; type: checkbox)
- End with a newline (en; key: finalNewline; type: checkbox)
- Indentation style (en; key: indentStyle; type: select): Spaces [en], Tabs [en]

## Limitations (en)

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Example input

```text
{"name":"ToolCabana","count":2}
```

## Privacy and connections (en)

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

## Questions (en)

### What does json formatter do?

Accepts strict JSON. Trailing commas, comments, single quotes and nonfinite numbers are invalid. Formatting preserves parsed values; duplicate keys follow JSON.parse semantics, so only their final value remains.

### Where is my input processed?

This operation processes its source in your browser. Copy and download are explicit actions; source input is not saved in an account or history.

### What are the input limits?

Text operations generally accept up to 2,000,000 characters. Individual parsers, generators and formulas apply additional limits shown by their controls.

## Related tools

- [JSON validator](https://www.toolcabana.com/or/json-validator)
- [JSON minifier](https://www.toolcabana.com/or/json-minifier)
- [JSON diff](https://www.toolcabana.com/or/json-diff)
- [JSON to CSV](https://www.toolcabana.com/or/json-to-csv)
