SiteTidy
Home /Tools /HTML Entity Encoder/Decoder

HTML Entity Encoder/Decoder

Encode special characters into safe HTML entities, or decode them back to text.

Input

Output

What are HTML Entities?

Certain characters are reserved in HTML and cannot be used freely in text because the browser will interpret them as HTML markup. For example, the less-than sign (<) starts an HTML tag.

Encoding (Escaping)

To display these reserved characters, they must be converted into character entities. For example, < becomes &lt;. This process is crucial for displaying code snippets on websites and preventing Cross-Site Scripting (XSS) attacks by escaping user input.

Decoding (Unescaping)

Decoding is the reverse process. It takes a string containing HTML entities (like &amp;) and converts them back to their original characters (like &).

Related Guides

Deepen your understanding with our expert articles.