HTML Decoder | HTML to Unicode

Use this online free HTML Decoder Tool to decode the encoded characters and to convert the HTML code to JavaScript Unicode string. The tool, also, allows you to convert all the applicable characters to their corresponding HTML entities.

HTML Decoder

Conversion Checklist:

Convert & to &

Convert &lt; to <

Convert &gt; to >

Convert &quot; to "

Convert &#039; to '

What is HTML Encode?

HTML character encoder converts all the ASCII characters to their HTML entities. Every character has a specific meaning and every converted entity code conveys the original message of that character.

An HTML entity is a piece of text ("string") that begins with an ampersand (&) and ends with a semicolon (;). Entities are frequently used to display reserved characters (which would otherwise be interpreted as HTML code), and invisible characters (like non-breaking spaces). You can also use them in place of other characters that are difficult to type with a standard keyboard.

HTML has a set of special characters that browsers recognize as part of the HTML language itself. For example, less-then < cannot be written directly in the HTML page because browsers will consider it as an opening HTML tag. That is why the entity code of < sign in HTML will be written as "&lt;".

What is HTML Decode?

HTML character decoding is the opposite process of encoding. The encoded characters are converted back to their original form in the decoding process. It decodes a string that contains HTML numeric character references and returns the decoded string.

You can also choose to convert HTML code into JavaScript string.

HTML Encoder also converts HTML code into JavaScript Unicode string which means the text looks scrambled when your source code is viewed, but when executed as a web page, it appears to be normal.

Reserved Characters of HTML

HTML has a set of special characters which browsers recognize as part of the HTML language itself. For example, browsers interpret the < character in the HTML code as the beginning of a tag. Thus, the < character is considered as a reserved character. It is reserved by the HTML language as it has special meaning specifying the beginning of a tag.

But how to tell the browsers to interpret those reserved characters as a part of the content, not as a part of HTML code?

Here, the HTML character entity references come to the rescue.

There are 3 reserved characters that should always be substituted with their corresponding entity character references.

  1. Instead of <, you should use "&lt;"
  2. Instead of >, you should use "&gt;"
  3. Instead of &, you should use "&amp;"

Another reason to use the HTML Encoder to quickly output special characters not readily available on our keyboards. One such character that is used quite often is the copyright symbol or ©. The character entity reference code for © is "&copy;".

So, our HTML Encoder can help you to quickly convert the characters and get the equivalent HTML entities. (source: w3docs)

Related Tools