HTML Decoder

Oct 26, 2017

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

Encode text using HTML encoding so that it can be represented as valid HTML & download the output, all on the client side

View Tool

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

Settings Explained
  • 1. 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
  • 2. 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
  • 3. 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:
Comments 0

History
Oct 26, 2017
Scroll to ouput on submit (configurable)
Ability to decode unicode escape characters & support for replacing non-breaking space with regular space in
Oct 1, 2017
Tool Launched