HTML Entity Encoder

Turn <, & and quotes into HTML entities, or turn entities back into plain characters.

Option
Format
Input Text
Encoded Result

An HTML entity is a character written as & followed by a name or number and ;. The tool encodes or decodes in the format you choose, entirely inside the page. With the option set to "Special chars only", this tag <a title="Tom & Jerry's"> comes out three ways.

FormatResult
Named&lt;a title=&quot;Tom &amp; Jerry&apos;s&quot;&gt;
Numeric&#60;a title=&#34;Tom &#38; Jerry&#39;s&#34;&#62;
Hex&#x3C;a title=&#x22;Tom &#x26; Jerry&#x27;s&#x22;&#x3E;

"Special chars only" changes five characters: <, >, &, the double quote and the single quote. Everything else stays as it is.

All characters and unnamed symbols

"All characters" also converts anything above code point 127. Named format uses a name only for the 30 characters it knows and falls back to a decimal number for the rest.

CharacterNamedNumericHex
€&euro;&#8364;&#x20AC;
©&copy;&#169;&#xA9;
é&#233;&#233;&#xE9;

In a UTF-8 document with <meta charset="UTF-8">, non-ASCII text needs no conversion. Keep this option for places where the encoding is unreliable, such as email bodies.

Decoding handles every decimal and hex number, but names only from those same 30, so &middot; stays unless you write &#183;. Names must be lowercase with the semicolon. Names are decoded before numbers, so &amp;#60; is decoded twice and ends as <. This is not an XSS defense inside <script> or javascript: URLs. For percent-encoding in addresses, use the URL encoder.