HTML Entities encoder / decoder

This tool allows you to convert text to HTML and back. It handles standard HTML entities as well as unicode named entities.

Input clear
Enter text to encode24 character(s)
Encoded result41 character(s)

About HTML entities

HTML entities are a way of encoding special characters in HTML that are either part of the HTML markup language or historically where unable to be represented using common in the past fixed length 8 bit character encodings.

Named entities

The general syntax is ampersand followed by entity name or code, and completed by a semicolon. Example & will produce & character, while © will produce © character.

Named entities should be used for all HTML reserved characters. Using named entities for other characters is not needed when using unicode encodings like UTF-8, however it is sometimes advised as it makes it clear in HTML source code that this is a special character.

Unicode character entity

The other way to use entities is by using unicode character codes. You can provide those by using # symbol followed by a decimal character code, or by using #x followed by hexadecimal character code.

For example © and © will both produce the same character: ©.

Using unicode entities referenced by their character code is not really useful these days, unless you need to encode the HTML using some character set that does not support that character or when you cannot enter that character using your keyboard or other input methods.

In most cases, if an unicode character has a named entity (e.g. © vs ©), the named entity should be used. This will make your HTML more readable.

List of reserved HTML5 characters

The following table contains a list of characters that must always be represented using HTML entities, otherwise your HTML will be broken.

CharacterDescriptionNamed entityCode entity
<less than&lt;&#60;
>greater than&gt;&#62;
&ampersand&amp;&#38;
"double quotation mark&quot;&#34;

WhatWG website has a complete list of all named HTML entities in the HTML Living Standard document. You probably won't ever use 99% of them, however I am including it here for completeness.