digtools
🔣
html entity converter,

HTML Entity Converter

Encode and decode special characters for XSS prevention.

Two-way
Encode & Decode
📝
Formats
Name/Dec/Hex
Real-time
Instant convert

Common HTML Entities Reference

Char Named Decimal Hex Description
&&&&Ampersand
<&lt;&#60;&#x3C;Less than
>&gt;&#62;&#x3E;Greater than
"&quot;&#34;&#x22;Double quote
'&apos;&#39;&#x27;Single quote
 &nbsp;&#160;&#xA0;Non-breaking space
©&copy;&#169;&#xA9;Copyright
®&reg;&#174;&#xAE;Registered trademark
&trade;&#8482;&#x2122;Trademark
about,

About this tool

The HTML Entity Converter is a lightweight developer utility designed to translate special characters (like < > & " ') into HTML-safe equivalents. It supports both encoding plain text into Named, Decimal, and Hexadecimal entities, and decoding them back into human-readable text.

HTML entities like &amp;, &lt; or &gt; are supported in three formats: named entity, decimal, and hexadecimal.

howto,

How to use

STEP 1

Select mode

Choose the 'Encode' or 'Decode' tab.

STEP 2

Enter text

Input HTML to decode, or plain text to encode.

STEP 3

Copy result

Copy the encoded/decoded result to clipboard.

glossary,

Glossary

HTML Entity
A piece of text ("string") that begins with an ampersand (&amp;) and ends with a semicolon (;). Entities are used to display reserved characters in HTML.
Named Entity
Uses an easy-to-remember name, like &amp;copy; for the copyright symbol ©.
Decimal / Hexadecimal Entity
Uses the character's numeric code (base-10 or base-16) to specify it directly. This works for all Unicode characters including emojis.
XSS (Cross-Site Scripting)
A vulnerability where hackers inject malicious scripts. Escaping HTML characters is the primary defense against XSS.
faq,

FAQ

Q.Which characters are encoded?
The five essential HTML characters (&amp;, &lt;, &gt;, &quot;, &apos;) are encoded to their named equivalents. Additionally, all non-ASCII characters (like emojis and accented letters) are encoded into decimal/hex numeric references.
Q.Does it handle full HTML documents?
Yes, you can paste entire HTML documents into the Encode tab to safely escape the source code so it can be displayed inside a &lt;pre&gt;&lt;code&gt; block on a webpage.
Q.Can it decode JavaScript escapes like \u00A9?
No. This tool is strictly for HTML entities (&amp;...;).
scenes,

Use Cases

📝

Displaying Code Snippets

Encode HTML source code so it can be safely displayed on a tutorial blog without being rendered by the browser.

🔒

Security / Sanitization

Double-check how user input is escaped to prevent Cross-Site Scripting (XSS) injection attacks.

📧

Email Templates

Convert Unicode characters and emojis to numeric entities to ensure they render correctly across older or restrictive email clients.

Send Feedback

Please let us know your thoughts to help us improve the tool.

Disclaimer

The tools provided on this site are completely free to use, but please use them at your own risk. We make no guarantees regarding the accuracy, completeness, or safety of any calculation results, conversion results, or generated data. Please be aware that the operator assumes no responsibility for any damages or troubles caused by the use of these tools. Most tools process files and calculations locally in your browser, meaning your inputted data is neither sent to nor stored on our servers.