HTML Entity Encode
How it Works - HTML Entity Encode
Add your raw html into the top box and press the encode button to populate the second box with html entity encoded content.
Then you can copy and paste the converted content into your code page, or into tiny mce to show the code rather than run it as html.
so you can paste in some html into the top box, e.g:
test and it will turn it into