# Formattatore JSON

> Formatta il JSON con un'indentazione leggibile.

[Open tool](https://www.toolcabana.com/it/json-formatter) · [Sviluppo e dati](https://www.toolcabana.com/it/category/developer-and-data)

Tool ID: json-formatter. Requested language: it. Description language: it. Complete guide translation: yes.

## Overview (en)

JSON formatter takes strict JSON and returns the same data with readable line breaks and indentation. You can set 1 to 8 indent spaces or switch to tabs, sort object keys alphabetically, and end the output with a newline. Integers beyond the exact safe range are rejected instead of being silently rounded.

## Supported tasks (it)

Accetta solo JSON in forma rigorosa. Virgole finali, commenti, virgolette singole e numeri non finiti non sono validi. La formattazione mantiene i valori analizzati; per le chiavi duplicate vale la semantica di JSON.parse, quindi rimane solo il valore finale.

## Steps (it)

1. Digita o incolla il testo di origine, oppure carica un esempio.
2. Modifica le impostazioni di base o apri la modalità avanzata per ottimizzare il risultato.
3. Esamina e copia o scarica il risultato. Metti in pausa i risultati in tempo reale per eseguire manualmente. Origini o singole impostazioni superiori a 20.000 caratteri richiedono un'esecuzione esplicita.

## Settings

- Spazi di indentazione (it; key: indent; type: number); minimum: 1; maximum: 8
- Ordina le chiavi dell'oggetto in ordine alfabetico (it; key: sortKeys; type: checkbox)
- Termina con una nuova riga (it; key: finalNewline; type: checkbox)
- Stile di indentazione (it; key: indentStyle; type: select): Spazi [it], Tabulazioni [it]

## Limitations (it)

Le operazioni di testo accettano in genere fino a 2.000.000 di caratteri. Parser, generatori e formule singoli applicano limiti aggiuntivi mostrati dai relativi controlli.

## Example input

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

## Privacy and connections (it)

Questa operazione elabora i dati di origine nel tuo browser. Copia e download sono azioni esplicite; l'input di origine non viene salvato in un account né in una cronologia.

## Questions (it)

### Can I format JSON with tabs instead of spaces?

Yes. Open Advanced mode and set Indentation style to Tabs. With Spaces selected, the Indent spaces setting accepts any whole number from 1 to 8, and the default is 2.

### Does the JSON formatter accept trailing commas or comments?

No. It accepts strict JSON only, so trailing commas, comments, single quotes and nonfinite numbers produce an error that names the line and column where parsing failed.

### What happens to duplicate keys when I format JSON?

Duplicate keys follow standard JSON.parse behavior, so only the last value for a repeated key remains in the formatted output. Check the source if earlier values matter to you.

### Dove viene elaborato il mio input?

Questa operazione elabora i dati di origine nel tuo browser. Copia e download sono azioni esplicite; l'input di origine non viene salvato in un account né in una cronologia.

### Quali sono i limiti di input?

Le operazioni di testo accettano in genere fino a 2.000.000 di caratteri. Parser, generatori e formule singoli applicano limiti aggiuntivi mostrati dai relativi controlli.

## Related tools

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