User Rating 0.0
Total Usage 0 times
Input
Result
Is this tool helpful?

Your feedback helps us improve.

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).

html escape entity converter utf8 decode web tools xml sanitizer

Formulas

The conversion relies on the Unicode Code Point n of a character. The general syntax for a numeric HTML entity is:

Entity = & # n ;

For hexadecimal representation, the formula converts n to base-16:

HexEntity = & # x hex(n) ;

Where hex(n) is the value of n expressed in the hexadecimal numeral system.

Reference Data

CharacterNamed EntityDecimalHexDescription
""""Double Quote
&&&&Ampersand
<<<<Less Than
>>>>Greater Than
©©©©Copyright
Euro Sign
ππππGreek Pi
😀N/A😀😀Grinning Face

Frequently Asked Questions

Escaping prevents the browser from interpreting text as code. For example, if you write "5 < 10", the browser might think "< 10" is the start of an HTML tag. Escaping it to "5 < 10" ensures it displays correctly and prevents security vulnerabilities.
Named entities (like ©) are easier to read but not all characters have names. Decimal (©) and Hex (©) entities work for any Unicode character and are universally supported by browsers.
Yes. Emojis are standard Unicode characters. Since most emojis do not have "Named" equivalents, they will be converted to their Decimal or Hexadecimal codes (e.g., 😀 for a smiley face).
No. All calculations happen instantly in your browser using JavaScript. Your text data never leaves your device.