HTML entity converter | Encoder & Decoder

What is HTML entity

An HTML entity is a string of characters that have special significance in HTML and begins with an ampersand (&) and ends with a semicolon. These pieces of text are used to display reserved or invisible characters in HTML that would otherwise be interpreted as HTML code. In other words, HTML entities are useful when you want to generate content that is going to be included in pages with different encodings.

Reserved characters in HTML

The characters that make up the HTML language are known as reserved characters in HTML, i.e. double quotes ("), apostrophe ('), less than (<), greater than (>), ampersand (&) and many more. The browser will interpret it as HTML if you use one of these characters while designing a website. That's why you should use the entity name or entity number when you want to display any of these reserved characters on the screen.


For example, if you want to show ampersand anywhere on the web page, you will type & in the code. If you simply write the ampersand symbol (&), the browser will consider it as a part of the HTML code. Similarly, you will type < for less than, > for greater than and " for quotation marks. You can see the official list of HTML entities here.

What is an HTML entity converter tool?

Do you find it difficult to memorize the entity names or entity numbers of reserved HTML characters? Checking out the huge HTML entities table, again and again, is also time-consuming. HTML entity encoder is an online HTML encoder that will convert your text into its corresponding HTML entity name, i.e. string to HTML.

In this article, we will talk about Freenerdtools's HTML entity converter, a free online tool that converts characters to their corresponding HTML. In short, it converts all applicable characters to HTML entities and acts as both an HTML encoder and decoder.

Encode HTML entities

The interface of Freenerdtools' HTML encoder is self-explanatory. Just enter your text in the input area to convert it into HTML syntax, and select encode from the type options. In the end, press submits button to generate text to HTML entities. You will see the particular encoded HTML entity result below.

Decode HTML entities

The procedure for decoding applicable characters to their corresponding HTML entities is also the same. Type or paste the entity code or entity number in the regular text field, select decode from the dropdown and click the submit button. The tool converts HTML entities to text and produces readable text accordingly.

When to use HTML entities instead of plain HTML

You can use HTML entities when:

  • Your keyboard does not support the single character you want to type, i.e. copyrights symbol or em-dash.
  • You want to make it explicit in the source what is happening. For example, the ¬† code is clearer than the corresponding white space character.
  • Your editor does not support Unicode. If your pages are encoded in UTF-8 you should have no need to reference HTML entities. Just use the characters you want directly.
  • You need to escape HTML special character set, i.e. double quotes ("), apostrophe ('), less than character (<), greater than character (>), ampersand (&) etc.

Popular tools