🏷️ HTML Entity Encoder/Decoder

Convert special characters to HTML entities and back

Common HTML Entities

Character Entity Name Entity Number Description
< &lt; &#60; Less than
> &gt; &#62; Greater than
& &amp; &#38; Ampersand
" &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

Frequently Asked Questions

What are HTML entities and when should I use them?

HTML entities are special codes that represent reserved characters in HTML. Use them when you want to display characters like <, >, &, or quotes as literal text instead of HTML code. For example, &lt; displays as < instead of starting an HTML tag.

What's the difference between named and numbered entities?

Named entities use descriptive names like &amp; for ampersand, &lt; for less-than. Numbered entities use decimal codes like &#38; or hex codes like &#x26;. Both produce the same result, but named entities are more readable in source code.

Do I need to encode all special characters?

You must encode &, <, and > to prevent HTML parsing issues. Quotes (" and ') should be encoded in HTML attributes. Other characters like copyright (©) or euro (€) can be entered directly with UTF-8 encoding, but entities ensure compatibility with all systems.

How does the decoder handle complex entities?

The decoder recognizes both named entities (&amp;) and numbered entities (&#38; or &#x26;). It uses browser's native HTML parsing to ensure accurate decoding of all standard entities including special symbols, accented characters, and emoji codes.