HTML Entity Encoder / Decoder

Encode special characters to HTML entities or decode HTML entities back to characters. Supports named, numeric, and Unicode entities.

Plain Text / HTML0 chars
Encoded Entities

Common HTML Entities Reference

Character
Entity
Code
Description
&
&
&
Ampersand
<
&lt;
&#60;
Less than
>
&gt;
&#62;
Greater than
"
&quot;
&#34;
Double quote
'
&#39;
&#39;
Single quote
(space)
&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
&bull;
&#8226;
Bullet
°
&deg;
&#176;
Degree
×
&times;
&#215;
Multiply
÷
&divide;
&#247;
Divide
&euro;
&#8364;
Euro
£
&pound;
&#163;
Pound
¥
&yen;
&#165;
Yen

What are HTML Entities?

HTML entities are special codes used to represent reserved characters (<, >, &) and symbols that cannot be easily typed. They start with & and end with a semicolon. Named entities like &amp; are human-readable, while numeric entities like &#38; use character codes.

When to Use HTML Entities

  • - Displaying HTML tags as text in web pages
  • - Preventing XSS (cross-site scripting) attacks
  • - Inserting special characters and symbols
  • - Ensuring proper rendering across all browsers

How to Encode and Decode HTML Entities Online

  1. 1. Select Encode to convert special characters to HTML entities, or Decode to convert entities back to characters.
  2. 2. Paste or type your input in the text area. Results update in real time as you type.
  3. 3. Use Swap Input/Output to quickly flip the result back as input for chained encoding/decoding.
  4. 4. Click Copy to copy the result to your clipboard.
  5. 5. Refer to the reference table above for common HTML entities and their character codes.

Frequently Asked Questions

What is the difference between named and numeric HTML entities?

Named entities use a human-readable name like &amp; for the ampersand character. Numeric entities use the Unicode code point in decimal (&#38;) or hexadecimal (&#x26;) format. Both produce the same result, but named entities are easier to read in source code.

Why do I need to encode HTML entities?

Characters like <, >, &, and " have special meaning in HTML. If you include them directly in your HTML content, browsers may interpret them as markup instead of displaying them as text. Encoding prevents rendering issues and XSS security vulnerabilities.

Does this tool support Unicode characters?

Yes. When encoding, any character with a code point above 127 (non-ASCII) is converted to a hexadecimal Unicode entity like &#x20AC; for the Euro sign. When decoding, both hex (&#x...;) and decimal (&#...;) numeric entities are supported.

Is my data sent to a server?

No. All encoding and decoding runs entirely in your browser using JavaScript. Your text is never uploaded or stored anywhere.