Published on: 01 July, 2014

Html Encoder

Posted by andy | 2337 views 0 favourites 0 comments
Tumblr Digg Google Plus

Need to encode your html code? Use our free tool Html Encoder to encode your html code. Simply copy the html code into the following box and click the Encode Html button. Do not forget to check our HTML decoder tool.

The reason why we need to do HTML encoding is to make sure that text is displayed correctly in browser and not interpreted by browser as html text. The significant example is the sign < and >, the browser will consider those tags as the opening and closing of HTML tag.

How to encode in C# .Net?

To decode in C# .Net, you can use the following code.

    HttpUtility.HtmlEncode("html text");

    //Another option
    Server.HtmlEncode("html text");	

The following characters are reserved by HTML tags. Therefore those characters need to be encoded first in order they can be displayed properly.

Character Entity Name Description
" &quot; quotation mark
' &apos; apostrophe 
& &amp; ampersand
< &lt; less-than
> &gt; greater-than

How to decode the html encoding?

You can easily decode the html encoding text by using our HTML Decoding tool.