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.
All processing happens on the client-side, locally in your browser. No data is uploaded.
Paste plain text below
HTML encoded text
History
- 2017-08-20Tool Launched
Background
Certain characters need to be encoded (escaped) in HTML.
Read more at wikipedia.
Example Substitutions
- & → & (ampersand, U+0026)
- < → < (less-than sign, U+003C)
- > → > (greater-than sign, U+003E)
- " → " (quotation mark, U+0022)
- ' → ' (apostrophe, U+0027)
How to do HTML encoding in various programming languages
| Language | Encode | Decode | Example | Documentation |
|---|---|---|---|---|
| C# | System.Net.WebUtility.HtmlEncode() | System.Net.WebUtility.HtmlDecode() | Example | HtmlEncode() HtmlDecode() |
| VB .NET | System.Net.WebUtility.HtmlEncode() | System.Net.WebUtility.HtmlDecode() | Example | HtmlEncode() HtmlDecode() |
| Java | org.apache.commons.lang.StringEscapeUtils.escapeHtml() | org.apache.commons.lang.StringEscapeUtils.unescapeHtml() | Example | escapeHtml() unescapeHtml() |
| JavaScript | htmlEncode() | htmlDecode() | Example | |
| Python | html.escape() | html.unescape() | escape() unescape() | Documentation |