🌐
HTML Formatter
FreePaste raw or minified HTML and get a nicely indented, formatted version. Great for debugging templates and cleaning up generated markup.
Indent:
How to Use HTML Formatter
- 1
Paste your raw or minified HTML markup into the input panel.
- 2
Choose your preferred indentation size — 2 spaces or 4 spaces — using the toggle at the top.
- 3
The formatted HTML appears in the output panel instantly with proper nesting, indentation, and attribute alignment.
- 4
Click "Copy" to copy the result. Inline <script> and <style> blocks are preserved unchanged inside the formatted markup.
Features
- ✓ Configurable indentation
- ✓ Attribute sorting option
- ✓ Preserves embedded scripts and styles
Frequently Asked Questions
Will it break my HTML?
No. The formatter only adjusts whitespace and indentation — it never modifies tags, attributes, or content.
Does it reformat inline JavaScript or CSS?
Inline <script> and <style> blocks are preserved as-is. Only the surrounding HTML structure is indented.