Free Online Tool

HTML Entity Encoder / Decoder

Encode & decode HTML entities for safe HTML rendering

No data is sent to any server — everything runs client-side

Plain Text

Text with special characters

Input

Encoded Output

HTML-safe entities

Output

What Are HTML Entities?

HTML entities are special character sequences that represent reserved characters in HTML. Characters like <, >, and & have special meaning in HTML — the browser interprets them as tag delimiters and entity markers. To display these characters as text, you must encode them as entities.

There are two types: named entities (like &amp;) and numeric entities (like &#38;). Named entities are human-readable, while numeric entities can represent any Unicode character.

Common HTML Entities Reference

CharacterNamedNumericDescription
&&amp;&#38;Ampersand
<&lt;&#60;Less than
>&gt;&#62;Greater than
"&quot;&#34;Double quote
©&copy;&#169;Copyright
&trade;&#8482;Trademark
&mdash;&#8212;Em dash
 &nbsp;&#160;Non-breaking space

Why Encoding Matters: XSS Prevention

HTML entity encoding is the primary defense against Cross-Site Scripting (XSS) attacks. When user input is rendered as HTML without encoding, an attacker can inject <script> tags that execute arbitrary JavaScript in other users' browsers. Encoding ensures that < becomes &lt;, preventing the browser from interpreting it as markup.

Related Tools

Built by JDApplications