100% Private — All processing happens locally in your browser.

HTML Entity Encoder/Decoder

Encode and decode HTML entities. All processing happens in your browser.

FreeNo SignupNo UploadsNo Tracking

HTML Entity Encoder/Decoder

Encode and decode HTML entities. Supports named and numeric entities. All processing happens in your browser.

InputTEXT
OutputHTML
Common HTML Entities Reference
CharNamedNumericDescription
&&&Ampersand
<&lt;&#60;Less than
>&gt;&#62;Greater than
"&quot;&#34;Double quote
'&#39;&#39;Single quote
 &nbsp;&#160;Non-breaking space
©&copy;&#169;Copyright
®&reg;&#174;Registered
&trade;&#8482;Trademark
&ndash;&#8211;En dash
&mdash;&#8212;Em dash
&lsquo;&#8216;Left single quote
&rsquo;&#8217;Right single quote
&ldquo;&#8220;Left double quote
&rdquo;&#8221;Right double quote
&hellip;&#8230;Ellipsis
·&middot;&#183;Middle dot
×&times;&#215;Multiplication
÷&divide;&#247;Division
&larr;&#8592;Left arrow
&rarr;&#8594;Right arrow
°&deg;&#176;Degree
&euro;&#8364;Euro
£&pound;&#163;Pound
Embed code
<iframe src="https://devally.dev/embed/html-entities" width="100%" height="600" frameborder="0" title="HTML Entity Encoder/Decoder - devcraft"></iframe>
<p style="font-size:12px;text-align:center;margin-top:4px;">
  <a href="https://devally.dev/tools/html-entities" target="_blank" rel="noopener">Powered by devcraft</a>
</p>
Attribution preview

Powered by devcraft

How to Use HTML Entity Encoder/Decoder

  1. 1

    Paste your text

    Paste text with special characters to encode, or text with HTML entities to decode.

  2. 2

    Auto-detect or choose mode

    The tool auto-detects whether to encode or decode. You can also switch modes manually.

  3. 3

    See instant results

    The output updates in real time as you type, showing the encoded or decoded text.

  4. 4

    Use the reference table

    Browse the common HTML entities reference table below for quick lookup of characters, named entities, and numeric codes.

Frequently Asked Questions

No. All encoding and decoding happens entirely in your browser. Your data never leaves your machine.

Named entities (like &amp;amp;), decimal numeric entities (like &amp;#38;), and hexadecimal numeric entities (like &amp;#x26;).

Yes. If the input contains HTML entities, the tool automatically switches to decode mode. You can override this manually.

All HTML-special characters (&, <, >, quotes) plus any characters above ASCII 127 are converted to their entity equivalents.

Related Tools

Why HTML Entities Exist

HTML uses certain characters as syntax: < opens a tag, & starts an entity reference, and " delimits attributes. When you need these characters to appear as literal text, you must encode them as entities — &lt; for <, &amp; for &, and &quot; for ". Failing to encode user-generated content is the root cause of XSS (Cross-Site Scripting) vulnerabilities, one of the most common security flaws in web applications.

Named vs. Numeric Entities

Named entities like &copy; (copyright symbol) and &mdash; (em dash) are human-readable but only a fixed set exists in the HTML specification. Numeric entities (&#169; decimal or &#xA9; hexadecimal) can represent any Unicode character, including emoji and characters from non-Latin scripts. In practice, modern UTF-8 encoded pages can include most characters directly without entities — but the five reserved characters (< > & " ') should always be encoded in user content.

Entities and Modern Frameworks

React, Vue, and Angular automatically escape HTML entities in text content by default, preventing XSS. React's dangerouslySetInnerHTML and Vue's v-html directive bypass this protection — use them only with trusted or sanitized content. Server-side template engines like EJS and Jinja2 also auto-escape by default, but raw output modes (<%- in EJS, |safe in Jinja2) skip encoding. Understanding when and why entities are applied helps you work with, rather than against, your framework's security model.