HTML Entity Encoder

Encode and decode HTML entities instantly. Convert special characters to HTML-safe representations and vice versa.

Encode & DecodeNamed EntitiesCopy Output
HTML Entity Tool
Input (Plain Text)
Output (HTML Entities)
Common HTML Entities Reference
CharacterEntityNumericDescription
&&&Ampersand
<&lt;&#60;Less than
>&gt;&#62;Greater than
"&quot;&#34;Double quote
'&apos;&#39;Single quote
 &nbsp;&#160;Non-breaking space
©&copy;&#169;Copyright
®&reg;&#174;Registered
&trade;&#8482;Trademark
&euro;&#8364;Euro sign
£&pound;&#163;Pound sign
&mdash;&#8212;Em dash
About HTML Entities

What Are HTML Entities?

HTML entities are special codes that represent characters which have meaning in HTML syntax or which cannot be easily typed on a keyboard. For example, the < character opens an HTML tag, so to display it as text you must write &lt;. This prevents the browser from interpreting it as markup.

When to Use HTML Entities

  • Displaying code: Show HTML/XML code snippets in web pages
  • Special characters: Use symbols like © ™ € in your content
  • Preventing XSS: Encode user input before displaying it in HTML
  • Email templates: Some email clients require entity-encoded characters

For a complete reference, see the HTML Living Standard named character references.

See also: URL Encoder/Decoder and Base64 Encoder.

Frequently Asked Questions

What are HTML entities?
HTML entities are special codes used to represent characters that have meaning in HTML (like < > & ") or characters not easily typed on a keyboard.
When should I use HTML entities?
Use when displaying code snippets in HTML, when you need special characters in attributes, or to prevent XSS by encoding user input.
Named vs numeric entities?
Named entities use descriptive names (&amp; for &). Numeric use codes (&#38;). Named are more readable; numeric cover more characters.