HTML Decoder is used to decode or unescape text that has been encoded using HTML encoding, back to it's original form.
Encode text using HTML encoding so that it can be represented as valid HTML & download the output, all on the client side
View ToolCertain 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)
- < → < (less-than sign, U+003C)
- > → > (greater-than sign, U+003E)
- " → " (quotation mark, U+0022)
- ' → ' (apostrophe, U+0027)
- → space (non breaking space, U+00A0)
How to do HTML encoding in various programming languages
- Language: C#
- Encode:
System.Net.WebUtility.HtmlEncode()
- Decode:
System.Net.WebUtility.HtmlDecode()
- Example: Example
- Documentation: HtmlEncode() HtmlDecode()
- 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:
- Language: Python
- Encode:
html.escape()
- Decode:
html.unescape()
- Example: escape() unescape()
- Documentation: Documentation
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
Comments 0