Formattatori e Codice
Formattatore HTML
Formattatore e minificatore HTML gratuito. Rendi più bello con l'indentazione predefinita di Prettier e il wrapping degli attributi, o comprimi HTML in una singola riga per la produzione. Nel browser, nulla viene caricato.
Nota dell'editore
Understanding · Indented HTML, sane defaults.
Questo capitolo approfondito è attualmente disponibile solo in inglese. Lo strumento di conversione qui sopra funziona nella tua lingua; il lungo articolo esplicativo non è stato ancora tradotto.
Domande frequenti
Quick answers.
›Which HTML formatter is this?
Prettier's HTML parser with default settings — 2-space indent, 80-column target, attribute per line when the tag overflows. The minifier is a lightweight whitespace collapser that preserves <pre>, <script>, <style> and <textarea> content byte-for-byte.
›Will it break my <pre>, <script>, or <style> blocks?
No — those blocks are protected from whitespace collapse during minification. Their content is extracted, the rest of the document is minified, then the blocks are restored verbatim.
›Does it work on HTML fragments, not just full documents?
Yes. Paste a <div>...</div> or any partial tree; Prettier handles it the same way it handles a full document.
›Is my HTML uploaded?
No — formatting and minification run entirely in your browser. Safe for sensitive markup.
Le persone cercano anche
Strumenti correlati
More in this room.
- Minificatore HTMLComprimi spazi bianchi, elimina commenti — HTML snello.
- Formattatore e Validatore JSONRendi più bello, minimizza e convalida JSON — gratuito, senza registrazione.
- Formattatore SQLRendi più belle e indentate le query SQL brutte.
- Formattatore e Validatore XMLRendi più bello, minimizza e convalida XML — istantaneamente.
- Formattatore CSSRendi più belli e minimizza i fogli di stile CSS.
- Formattatore JavaScript / TypeScriptJS e TS formattati con Prettier, nel browser.