HTML Formatter
runs in your browserno sign-upfree
Format unstructured or minified HTML into neat, readable markup with proper indentation.
Formatting…
About this tool
This HTML formatter indents and structures HTML so it is easy to read and edit. It also formats the CSS inside <style> tags and the JavaScript inside <script> tags. Use it to clean up minified pages, email templates or snippets copied from other tools.
How to use
- Paste your HTML into the Input box.
- Choose the indent and maximum line width.
- Copy the formatted HTML or download it as an .html file.
FAQ
Which formatter is used?
Prettier, the most widely used code formatter for web projects. It runs entirely in your browser, so your code is never uploaded.
Can formatting change how my page looks?
Prettier is careful with whitespace between inline elements, so in most cases the page looks exactly the same. Line breaks are only added where HTML ignores them.
What happens if my code has a syntax error?
The status line shows the problem with its line and column, and the error is marked in the editor. Fix it and the formatted result appears straight away.