HTML to Javascript Converter
Join the Discussion
To ensure that any HTML that you want generated from Javascript document.write statements does not get misinterpreted as Javascript we need to place a slosh (\) in front of certain characters in the text. Each line of HTML source also needs to be separated by \n so that the linefeeds will be correctly inserted into the generated HTML.
If you paste your HTML code into the following form and press the Convert button then the required changes will be made to your code. It even encloses the code into the document.write statement for you.

