Html Beautifier/Formatter
Max preserve newlines
Number of line-breaks to be preserved in one chunk.
Original code
<html>
    <body>
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <script>
        console.log("Hello World!");
        </script>
        <!--Line feed-->
    </body>
    <!--Line feed-->
</html>
<!--Line feed-->
0
<html>
    <body>
        <script>
        console.log("Hello World!");
        </script>
    </body>
</html>
5
<html>
    <body>
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <script>
        console.log("Hello World!");
        </script>
        <!--Line feed-->
    </body>
    <!--Line feed-->
</html>
<!--Line feed-->
10
<html>
    <body>
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <!--Line feed-->
        <script>
        console.log("Hello World!");
        </script>
        <!--Line feed-->
    </body>
    <!--Line feed-->
</html>
<!--Line feed-->
Quotes
Convert the quote characters delimiting strings from either double or single quotes to the other.
Original code
<input name='domain' id="domain" value='onlinetoolsdev.com'/>
none
<input name='domain' id="domain" value='onlinetoolsdev.com'/>
double
<input name="domain" id="domain" value="onlinetoolsdev.com"/>
single
<input name='domain' id='domain' value='onlinetoolsdev.com'/>
Indent comments
Determines whether comments should be indented.
Original code
<!DOCTYPE html>
<html>
    <head>
<!-- This is title -->
        <meta charset="utf-8">
        <title><%= title %></title>
    </head>
    <body></body>
</html>
true
<!DOCTYPE html>
<html>
    <head>
        <!-- This is title -->
        <meta charset="utf-8">
        <title><%= title %></title>
    </head>
    <body></body>
</html>
false
<!DOCTYPE html>
<html>
    <head>
<!-- This is title -->
        <meta charset="utf-8">
        <title><%= title %></title>
    </head>
    <body></body>
</html>
Force indentation
If indentation should be forcefully applied to markup even if it disruptively adds unintended whitespace to the documents rendered output.
Original code
<html><head> <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/> <title>Original code</title></head><body><h1>Hello, World!</h1><div>from <i>A Java Programmer</i></div></body></html>
true
<html>
    <head>
        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
        <title>
            Original code</title>
    </head>
    <body>
        <h1>
            Hello, World!</h1>
        <div>
            from
            <i>
                A Java Programmer</i>
        </div>
    </body>
</html>
false
<html>
    <head>
        <meta content="text/html; charset=UTF-8" http-equiv="Content-Type"/>
        <title>Original code</title>
    </head>
    <body>
        <h1>Hello, World!</h1>
        <div>from
            <i>A Java Programmer</i>
        </div>
    </body>
</html>
Top