A very handy tool to encode and decode special characters to HTML entities.
Certain characters have special significance in HTML, and should be represented by HTML entities if they are to preserve their meanings.
Here is a tool that is useful in preventing user-supplied text from containing HTML markup, such as in a message board or guest book application.

smallwei 2:14 pm on October 27, 2009
If you use php, there are two functions which would take care of the conversion: htmlspecialchars() and htmlentities()
The following characters will get converted:
There is a very good web based tool that would take care of both encoding and decoding.
The URL is: http://centricle.com/tools/html-entities/