How to use HTML Formatter
- Paste your HTML.
- Choose the indent size.
- Copy or download the formatted HTML.
Supported features and limitations
Each tag and text run goes on its own line, which can add visible spaces between inline elements in the formatted copy. Contents of <pre>, <textarea>, <script> and <style> are preserved.
Privacy
Everything you type is processed locally in your browser and is not sent to our servers. No account is needed and there is no watermark.
Frequently asked questions
Does it fix broken HTML?
No, it only re-indents what it is given.
Can I use the output in production?
Prefer the original or minified source for production; formatted HTML is for reading.
Related tools
- HTML Minifier - Reduce HTML size by removing comments and unneeded whitespace between tags.
- CSS Formatter - Beautify minified or messy CSS with consistent indentation, one declaration per line.
- HTML Previewer - Preview HTML and CSS safely in a sandboxed frame as you type.
- JSON Formatter & Validator - Format, minify and validate JSON with clear errors.
- URL Encoder / Decoder - Encode or decode URLs and query strings.
- Color Converter - Convert between HEX, RGB and HSL colours.