Convert Unicode and Emoji to HTML Entities
- Emoji and Unicode symbols can be represented as numeric HTML entities
- Useful for email HTML, XML feeds, and systems with limited Unicode support
- The encoder converts any pasted symbol — including emoji — to its entity code
- Most modern HTML pages should just use UTF-8 and paste emoji directly
Table of Contents
Emoji are Unicode characters — they have code points just like letters. The smiley face 😊 is U+1F60A, and you can represent it as the HTML numeric entity 😊. Most of the time you do not need to convert — if your page is UTF-8 encoded, you can paste emoji directly. But there are specific contexts where entity encoding emoji is necessary or useful.
When You Would Encode Emoji as HTML Entities
Most situations do not require encoding emoji. If your HTML file is saved as UTF-8 and declares <meta charset="UTF-8">, you can paste emoji directly and browsers render them correctly.
The cases where entity encoding emoji makes sense:
- HTML email templates — Some email clients (especially Outlook on Windows) have inconsistent emoji rendering. Encoding as numeric entities can improve compatibility, though the support gap varies.
- XML and RSS feeds — XML is strict about character encoding. If your feed is ASCII or ISO-8859-1 encoded, emoji must be represented as numeric entities. Modern feeds are UTF-8 and do not need this.
- Legacy systems — Older databases, content management systems, or publishing platforms that store content as Latin-1 (ISO-8859-1) cannot store emoji directly. Entity encoding allows you to include them without changing the storage encoding.
- Debugging and documentation — Knowing the entity code for an emoji is useful when you need to reference it in specifications, documentation, or code comments.
How to Convert Emoji or Unicode to HTML Entity
The HTML entity encoder handles Unicode characters including emoji:
- Paste your text — include the emoji or Unicode symbol you want to convert. Example:
Great work 🎉 - Click "Encode."
- See the output:
Great work 🎉
The encoder converts emoji to their decimal numeric entity form (&#NNNNNN;). This is the most widely supported format across browsers and email clients.
Non-ASCII characters that have named entities (like © → ©, ™ → ™) get their named entity. Characters outside the named entity set get their numeric form.
Sell Custom Apparel — We Handle Printing & Free ShippingCommon Emoji and Their HTML Entity Codes
| Emoji | Entity Code | Description |
|---|---|---|
| 😊 | 😊 | Smiling face with eyes |
| 🎉 | 🎉 | Party popper |
| ✅ | ✅ | Check mark button |
| ❌ | ❌ | Cross mark |
| ⚡ | ⚡ | Lightning bolt |
| © | © or © | Copyright symbol |
| ™ | ™ or ™ | Trademark |
Should You Use Direct Emoji or Entity Codes?
For modern UTF-8 HTML pages: use direct emoji. Pasting 🎉 directly into your HTML is cleaner, more readable, and works correctly in all modern browsers. There is no practical reason to encode emoji as entities in a properly declared UTF-8 document.
Use entity encoding when:
- Your file or database uses a non-UTF-8 encoding and cannot store the raw emoji character
- You are generating HTML content programmatically and need a safe ASCII representation
- You are writing RSS/Atom XML where strict character encoding matters
- The target system is an old email client with known emoji rendering problems
When in doubt: use UTF-8, declare it in your meta charset, and paste emoji directly. Only fall back to entity encoding when you have a specific reason to.
Convert Emoji and Symbols to HTML Entities
Paste any text with unicode or emoji. Get entity codes instantly. Free, no signup.
Open Free HTML Entity ToolFrequently Asked Questions
How do I get the HTML entity code for an emoji?
Paste the emoji into the HTML entity encoder and click Encode. The output shows the numeric entity (&#NNNNN;) for the emoji.
Do I need to encode emoji for HTML pages?
No, if your page is UTF-8 encoded. Declare meta charset=UTF-8 and paste emoji directly. Entity encoding emoji is only necessary for specific edge cases like legacy systems or non-UTF-8 XML.
What is the HTML code for a smiley face?
The 😊 emoji is 😊 in decimal numeric entity form, or 😊 in hex. On UTF-8 HTML pages, you can paste the emoji directly instead.
Can I convert Unicode symbols (not just emoji) to HTML entities?
Yes. The encoder handles any Unicode character — mathematical symbols, arrows, currency symbols, accented characters, and emoji all convert to their numeric entity equivalents.

