HTML Entity Encoder & Decoder

Encode special characters to HTML entities or decode entities back to text. Live preview as you type. Supports named, decimal, and hexadecimal entity formats.

0 chars
0 chars

HTML Entity Reference

Click any entity to copy it to your clipboard.

HTML Core

CharNamedDecimalHexDescription
&Ampersand
<Less than
>Greater than
"Double quote
'Apostrophe
Non-breaking space

Copyright & Trademark

CharNamedDecimalHexDescription
©Copyright
®Registered
Trademark

Currency

CharNamedDecimalHexDescription
Euro
£Pound
¥Yen
¢Cent

Arrows

CharNamedDecimalHexDescription
Left arrow
Right arrow
Up arrow
Down arrow
Left-right arrow

Math

CharNamedDecimalHexDescription
×Multiplication
÷Division
±Plus-minus
Not equal
Less or equal
Greater or equal
Infinity
°Degree
½One half
¼One quarter
¾Three quarters

Typography

CharNamedDecimalHexDescription
Em dash
En dash
Ellipsis
Bullet
·Middle dot
Left double quote
Right double quote
Left single quote
Right single quote
«Left guillemet
»Right guillemet

HTML Entity Tips

Prevent XSS attacks

Always encode user-supplied text before inserting into HTML. Characters like <script> become safe &lt;script&gt; entities.

Named vs numeric

Named entities (&amp;) are readable but limited. Numeric entities (&#38; or &#x26;) work for any Unicode character.

Email-safe HTML

Use "All Chars" mode to convert non-ASCII characters to entities. This ensures compatibility with email clients that don't support UTF-8.

The 5 mandatory characters

Always encode & < > " ' in HTML content. These are the characters that can break HTML parsing.

Bulk processing

Enable bulk mode to process multiple lines at once. Each line is encoded/decoded independently.

All processing is local

Your data never leaves your browser. Encoding and decoding happens entirely in JavaScript.

Frequently Asked Questions

Why do I need to encode HTML entities?

HTML entities prevent special characters from being interpreted as HTML markup. For example, < and > in text content would be parsed as tags without encoding. Encoding also prevents XSS (cross-site scripting) attacks by neutralizing injected HTML.

What is the difference between named, decimal, and hex entities?

Named entities use readable names (like &amp; for &). Decimal entities use the Unicode code point in base 10 (&#38;). Hex entities use base 16 (&#x26;). All three render identically in browsers. Named entities are most readable; numeric entities work for any Unicode character.

Which characters must be encoded in HTML?

The 5 mandatory characters are: & (ampersand), < (less than), > (greater than), " (double quote in attributes), and ' (single quote in attributes). All other characters can optionally be encoded for safety or to handle encoding issues.

Is my data safe?

Yes. All processing happens entirely in your browser using JavaScript. No data is sent to any server.