Enter HTML Code inside the Box and tap on the Convert To JS
How it works
1. Enter or Paste the HTML inside the Box and tap on the Convert To JS.
2. The HTML code has now been converted to Javascript.
3. Use the code wherever you like.
About HTML To JS Converter
This tool allows you to convert your HTML file to javascript code in a fast, secure, and free. A HTML to JS Converter was developed to convert HTML code online into JS code. The converter can print HTML code using JavaScript print functions, as well as set HTML code into variables, which is suitable for JS frameworks such as node.js, react.js, angular.js, etc. This will be useful in applications which require dynamically generated code. Quotations and backslashes will be escaped properly so the strings can be printed.
For Example
HTML Code
<html>
<head>
<title>ComRelated</title>
</head>
<body>
<p>HTML To Javascript Converter Example</p>
</body>
</html>
Converted JS Code
<script type="text/javascript">
document.write("<html>");
document.write("<head>");
document.write("<title>ComRelated</title>");
document.write("</head>");
document.write("<body>");
document.write("<p>HTML To Javascript Converter Example</p>");
document.write("</body>");
document.write("</html>");
// made by comrelated -->
</script>