UTF-8 to HTML Entity Converter
Convert special characters, symbols, and emojis into HTML-safe entities. Supports Named (©), Decimal (©), and Hex (©) formats for clean code.
About
This tool transforms raw text containing special characters - such as accented letters, mathematical symbols, or markup syntax - into their corresponding HTML entities. This process is critical for preventing rendering errors and protecting against Cross-Site Scripting (XSS) attacks in web development.
Browsers interpret characters like lt (<) as the start of a tag. To display them literally, they must be escaped. This converter maps a Unicode character c to its entity reference, either by name (e.g., ©) or by its numeric code point n.
We support three output modes: Named (human-readable), Decimal (highly compatible), and Hexadecimal (compact CSS/JS usage).
Formulas
The conversion relies on the Unicode Code Point n of a character. The general syntax for a numeric HTML entity is:
For hexadecimal representation, the formula converts n to base-16:
Where hex(n) is the value of n expressed in the hexadecimal numeral system.
Reference Data
| Character | Named Entity | Decimal | Hex | Description |
|---|---|---|---|---|
| " | " | " | " | Double Quote |
| & | & | & | & | Ampersand |
| < | < | < | < | Less Than |
| > | > | > | > | Greater Than |
| © | © | © | © | Copyright |
| € | € | € | € | Euro Sign |
| π | π | π | π | Greek Pi |
| 😀 | N/A | 😀 | 😀 | Grinning Face |