HTML Encoder

HTML Encoder is used to encode or escape text that is normally unsafe for transmission in HTML. These are special characters that have special meaning in the HTML format.

HTML Decoder
Paste plain text below

HTML encoded text

Certain characters need to be encoded (escaped) in HTML. Read more at wikipedia.

Example Substitutions

  • & → & (ampersand, U+0026)
  • &lt; → < (less-than sign, U+003C)
  • &gt; → > (greater-than sign, U+003E)
  • &quot; → " (quotation mark, U+0022)
  • &apos; → ' (apostrophe, U+0027)

How to do HTML encoding in various programming languages

C#System.Net.WebUtility.HtmlEncode()System.Net.WebUtility.HtmlDecode()ExampleHtmlEncode() HtmlDecode()
VB .NETSystem.Net.WebUtility.HtmlEncode()System.Net.WebUtility.HtmlDecode()ExampleHtmlEncode() HtmlDecode()
Javaorg.apache.commons.lang.StringEscapeUtils.escapeHtml()org.apache.commons.lang.StringEscapeUtils.unescapeHtml()ExampleescapeHtml() unescapeHtml()
Pythonhtml.escape()html.unescape()escape() unescape()Documentation