HTML Formatter

Formats a HTML string/file with your desired indentation level. The formatting rules are not configurable but are already optimized for the best possible output.

Note that the formatter will keep spaces and tabs between content tags such as div and span as it's considered to be valid content.

*The maximum size limit for file upload is 2 megabytes. All files bigger than 500k will be formatted to a new window for performance reason and to prevent your browser from being unresponsive.

Option 1: Copy-paste your HTML document here
Option 2: Or upload your HTML document
Indentation level: