HTML Entity Encoder

Encode and decode HTML entities

What are HTML Entities?

HTML entities are special codes used to represent characters that have special meaning in HTML or cannot be easily typed. For example, the less-than sign (<) is represented as &lt; because browsers would otherwise interpret it as the start of an HTML tag.

This tool converts special characters to their HTML entity equivalents (encoding) or converts entities back to readable characters (decoding).

Why Encode HTML Entities?

Prevent XSS Attacks

Encoding user input prevents malicious script injection by neutralizing HTML/JavaScript code.

Display Special Characters

Show symbols like &, <, > as text instead of being interpreted as HTML.

International Characters

Represent currency symbols, accented letters, and special characters reliably across all browsers.

Common HTML Entities

CharacterEntityDescription
&&amp;Ampersand
<&lt;Less than
>&gt;Greater than
"&quot;Quote

FAQ

When should I encode vs decode?

Encode when storing or displaying user input in HTML. Decode when you need the original characters back from encoded text.