53lu > Javascript to HTML
Free Javascript to HTML Converter
Use this free Javascript to HTML converter to convert your Javascript document.write() into HTML code (or plain text) statements. Enter your JS into the box below click "Convert Now" and it will be converted to Javascript code that outputs that same HTML or text. Quote and backslash characters will be appropriately escaped with backslashes so the strings will print correctly.
How it Works?
Just paste your HTML code to the textarea above and click to the button "JS to HTML" and you will get HTML statements or variable in the next textarea.
Example of JS conversion to HTML
Before:
document.writeln('<html>'); document.writeln(' <head>'); document.writeln(' <title>Your Title Here</title>'); document.writeln(' </head>'); document.writeln(''); document.writeln(' <body bgcolor="FFFFFF">'); document.writeln(' <center><img src="53lu.jpg" align="bottom"> </center>'); document.writeln(' <hr>'); document.writeln(' <a href="https://www.53lu.com">Best Online Web Tools</a>is a link to another nifty site'); document.writeln(' <h1>This is a Header</h1>'); document.writeln(' <h2>This is a Medium Header</h2>'); document.writeln(' <p> This is a new paragraph!</p>'); document.writeln(' <p> <b>This is a new paragraph!</b></p>'); document.writeln(' <br> <b><i>This is a new sentence without a paragraph break, in bold italics.</i></b>'); document.writeln(' <hr>'); document.writeln(' </body>'); document.writeln('</html>');
After:
<html> <head> <title>Your Title Here</title> </head> <body bgcolor="FFFFFF"> <center><img src="53lu.jpg" align="bottom"> </center> <hr> <a href="https://www.53lu.com">Best Online Web Tools</a>is a link to another nifty site <h1>This is a Header</h1> <h2>This is a Medium Header</h2> <p> This is a new paragraph!</p> <p> <b>This is a new paragraph!</b></p> <br> <b><i>This is a new sentence without a paragraph break, in bold italics.</i></b> <hr> </body> </html>