HTML Decoder

ENCODING   HTML  

HTML Decoder is used to decode or unescape text that has been encoded using HTML encoding, back to it's original form.



Input: Paste HTML text below



Settings

Certain characters need to be encoded (escaped) in HTML. Read more at wikipedia.
Decode Unicode Escape Characters
If selected, replaces unicode escape characters such as \u0026 with their unicode character counterparts.
Input
Beauty \u0026 the Beast
Decode Unicode Escape Characters On
Beauty & the Beast
Decode Unicode Escape Characters Off
Beauty \u0026 the Beast
Unescape Backslash
If selected, double backslash \\ is converted to a single backslash \
This is useful if the entire input is encoded HTML inside a string in JavaScript or JSON.
Input
Beauty \\u0026 the Beast
Unescape Backslash On
Beauty & the Beast
Unescape Backslash Off
Beauty \& the Beast
Use Non Breaking Space
If selected,   is replaced by the non breaking space character \u00A0 else it is replaced by the regular space.
A non breaking space prevents a line break from appearing in it's place when the text is being word wrapped.

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)
  • &nbsp; → space (non breaking space, U+00A0)

How to do HTML encoding in various programming languages

    • Language: VB .NET
    • Encode: System.Net.WebUtility.HtmlEncode()
    • Decode: System.Net.WebUtility.HtmlDecode()
    • Example: Example
    • Documentation: HtmlEncode() HtmlDecode()
    • Language: Java
    • Encode: org.apache.commons.lang.StringEscapeUtils.escapeHtml()
    • Decode: org.apache.commons.lang.StringEscapeUtils.unescapeHtml()
    • Example: Example
    • Documentation: escapeHtml() unescapeHtml()
    • Language: JavaScript
    • Encode: htmlEncode()
    • Decode: htmlDecode()
    • Example: Example
    • Documentation: