HTML Formatter
Beautify messy or minified HTML with clean, consistent indentation.
Input
Paste HTML above, or upload an .html file.
Output
How to use HTML Formatter
- Paste your HTML or upload a file.
- Click Format HTML.
- Copy the result or download it.
Frequently asked questions
Does formatting change how my page looks?
No. Only indentation and line breaks are changed. Inline text such as a sentence with bold words is kept on one line so that spacing in the rendered page is not affected.
Does it format the CSS and JavaScript inside the page?
Yes. Code inside <style> and <script> tags is indented too.
Does it fix broken HTML?
No. It formats what you give it and does not add missing closing tags.
Is my text uploaded to a server?
No. This tool runs entirely in your browser, so what you paste never leaves your device.