HTML Entity Encoder & Decoder

Convert special characters to Named, Decimal, and Hexadecimal HTML entities and decode encoded markup. Essential for XSS sanitization and formatting character references.

Common HTML Entity Reference:
Less than (<)
&lt; · &#60;
Greater than (>)
&gt; · &#62;
Ampersand (&)
&amp; · &#38;
Double quote (")
&quot; · &#34;
Single quote (')
&#39; · &#39;
Copyright (©)
&copy; · &#169;
Registered (®)
&reg; · &#174;
Euro ()
&euro; · &#8364;

W3C HTML5 Character Entity Specifications

An HTML entity is a standardized text string beginning with an ampersand (&) and ending with a semicolon (;) used to display reserved characters (which would otherwise be parsed as HTML markup) and invisible or non-ASCII characters.

The Five Core XML/HTML Reserved Characters

  • < (Less-than) → &lt; (Prevents browser from opening an HTML tag).
  • > (Greater-than) → &gt; (Prevents tag closing injection).
  • & (Ampersand) → &amp; (Prevents broken entity decoding).
  • " (Double-quote) → &quot; (Prevents breaking HTML attributes).
  • ' (Single-quote) → &#39; (Prevents breaking single-quoted attributes).

Cross-Site Scripting (XSS) Mitigation

Rendering raw user-generated content directly inside HTML templates without entity encoding creates severe Reflected and Stored XSS vulnerabilities. Escaping special characters into HTML entities ensures the browser interprets the input as inert text rather than executable script elements.

Synergies with Developer & Security Tools

Combine entity conversion with our webmaster utilities:

Frequently Asked Questions

What is the difference between Named and Decimal entities?

Named entities (e.g. &copy;) use human-readable words, while decimal (e.g. &#169;) and hexadecimal (e.g. &#xA9;) entities refer directly to the character's Unicode code point.

Does modern UTF-8 encoding make HTML entities obsolete?

While UTF-8 handles international characters (accents, emojis) natively, the core reserved characters (<, >, &, ") must always be entity-encoded when rendering dynamic data inside HTML.

How does entity encoding impact SEO?

Search engines parse HTML entities correctly when reading page titles and meta descriptions (e.g. &amp; in a title appears as & on Google search results).