# Formattatore HTML

> Formatta l'HTML senza eseguirlo.

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

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

## Overview (en)

HTML beautifier reformats HTML markup with consistent line breaks and indentation, using 1 to 8 spaces per level. The markup is parsed as text and never rendered or executed, so scripts in it do not run. Attribute quotes are normalized to double quotes, and invalid markup returns a parser error instead of output.

## Supported tasks (it)

Formatta l'HTML senza eseguirlo.

## Steps (it)

1. Incolla l'origine nell'editor di input, oppure carica l'esempio integrato.
2. Imposta gli spazi di indentazione.
3. Esegui il formattatore HTML, esamina il risultato, poi usa i controlli disponibili per copiare o scaricare.

## Settings

- Spazi di indentazione (it; key: indent; type: number); minimum: 1; maximum: 8

## 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
<main><h1>Hello</h1><p>World</p></main>
```

## 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)

### Does the HTML beautifier run scripts in my page?

No. The HTML is parsed as text and printed back with new indentation. Nothing is rendered, loaded or executed, including inline script elements.

### How do I change the indent size for formatted HTML?

Set Indent spaces to any whole number from 1 to 8 before running the tool. The default is 2 spaces per nesting level.

### Can I beautify a partial HTML snippet?

Yes. You can paste a fragment such as a main element with children rather than a full document. Elements that fit within the line width may stay on one line.

### 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

- [SQL formatter](https://www.toolcabana.com/it/sql-formatter)
- [CSS beautifier minifier](https://www.toolcabana.com/it/css-formatter)
- [JavaScript formatter](https://www.toolcabana.com/it/js-formatter)
- [XML formatter](https://www.toolcabana.com/it/xml-formatter)
