Ready to convert
Paste entities and click Decode// convert & ♥ and entities back to characters
Convert HTML entities like &, ♥, ♥ back to Unicode characters instantly. Supports named, decimal, and hex entities. Free browser-based tool.
Ready to convert
Paste entities and click DecodePaste any HTML code or text containing entities into the input field
Select Decode (entities โ characters) or Encode (characters โ entities)
Hit Decode Entities and copy your clean Unicode output instantly
HTML entities are special codes that represent characters in HTML. For example, & represents &, ♥ represents โฅ, and ♥ represents โฅ using hexadecimal. This tool decodes them back to readable Unicode characters, or encodes text the other way around.
Named entities use a keyword like & or ©. Numeric entities use the character's Unicode code point โ either decimal (©) or hexadecimal (©). All three forms represent the same characters and are fully supported by this tool.
Yes. The tool uses PHP's html_entity_decode() with the ENT_HTML5 flag, which covers the full HTML5 named character references including newer entities like 	, 
, and math symbols.
Your text is sent to our PHP backend for processing, but it is never stored, logged, or shared. Processing happens instantly and the data is discarded immediately after the response is returned. For very sensitive content, you can also use the browser's built-in DOM API as an alternative.
decodes to a non-breaking space (Unicode U+00A0), which looks identical to a regular space visually. The difference matters in HTML layout and text processing โ it prevents line breaks at that position. The tool correctly converts it; the character is just invisible.
Yes! Switch to "Encode Unicode โ Entities" mode using the toggle at the top. This will convert special characters like <, >, &, and quotes into their safe HTML entity equivalents, useful for embedding code inside HTML.
The tool supports up to 200,000 characters per conversion. For larger files, consider splitting your content into chunks or using a server-side script with PHP's html_entity_decode() function directly.
Working with HTML can be tricky when your text is littered with entity codes like &, ♥, or ♥. These codes are how web browsers safely represent special characters in HTML documents, but when you're processing text programmatically, debugging templates, or cleaning scraped content, you often need those raw Unicode characters back. This tool decodes all three entity formats instantly and shows you exactly what was converted.
๐ก Looking for premium HTML templates and themes? MonsterONE offers unlimited downloads of professional HTML themes, UI kits, and web assets โ worth checking out.
HTML supports three distinct entity formats, and all of them decode to the same Unicode characters:
& (ampersand &), < (less-than <), > (greater-than >), (non-breaking space), © (copyright ยฉ), and ™ (trademark โข). HTML5 introduced hundreds of additional named entities for mathematical symbols, arrows, and special punctuation.♥ decodes to โฅ (U+2665), © to ยฉ, and € to โฌ (the Euro sign). Any Unicode character can be expressed this way.x. ♥ is the same as ♥, both representing โฅ. Developers often encounter hex entities in minified HTML or XML output.HTML entities are inserted by templating engines, content management systems, and sanitizers to prevent XSS attacks and ensure valid HTML. WordPress, Drupal, and most PHP frameworks will automatically encode user-submitted content using htmlspecialchars() or similar functions. When you retrieve that content from a database and display it in a non-HTML context โ like a PDF, an email, an API response, or a plain-text file โ the raw entity codes show up verbatim instead of the intended characters.
Similarly, web scraping tools often return HTML source with entities intact. If you extract text with a regex or basic string parser instead of a proper HTML parser, you'll end up with entities that need to be decoded before the text is usable.
Under the hood, this tool uses PHP's html_entity_decode() function with the ENT_QUOTES | ENT_HTML5 flags and UTF-8 encoding. This combination ensures that:
', ") are decoded★ (โ
) and ♥ (โฅ)The Entity Map section shows you a side-by-side breakdown of each entity found in your input and the Unicode character it decoded to โ useful for auditing or learning what specific codes mean.
The reverse operation โ encoding plain text into HTML entities โ is equally useful. If you're writing HTML documentation, blog posts about code, or generating HTML that will be displayed inside a <pre> or <code> block, you need to encode characters like <, >, and & so the browser renders them as literal characters instead of interpreting them as HTML tags. The Encode mode uses htmlspecialchars() with HTML5 flag for standards-compliant output.
Here are some of the most frequently encountered entities and their Unicode equivalents: & โ & (U+0026), < โ < (U+003C), > โ > (U+003E), " โ " (U+0022), ' โ ' (U+0027), โ non-breaking space (U+00A0), © โ ยฉ (U+00A9), ® โ ยฎ (U+00AE), ™ โ โข (U+2122), € โ โฌ (U+20AC), £ โ ยฃ (U+00A3), ¥ โ ยฅ (U+00A5), — โ โ (U+2014), – โ โ (U+2013), … โ โฆ (U+2026), « โ ยซ (U+00AB), » โ ยป (U+00BB).
Modern HTML5 named entities include many symbols you might not expect: ★ or ★ โ โ
(black star), ♥ or ♥ โ โฅ (heart suit), ✓ โ โ (check mark), ✗ โ โ (cross mark), ☎ โ โ (telephone), ♣ โ โฃ (club suit), ♠ โ โ (spade suit), ♦ โ โฆ (diamond suit). Emoji in the higher Unicode planes (U+1F000 and above) are typically written as decimal entities like 😀 (๐) or hex like 😀.
When building a PHP application, use html_entity_decode($string, ENT_QUOTES | ENT_HTML5, 'UTF-8') to decode entities safely. Always specify the encoding โ without it, PHP may default to ISO-8859-1, which will corrupt multi-byte UTF-8 characters. When encoding for HTML output, use htmlspecialchars() rather than htmlentities() โ the latter will encode every character with a named equivalent, producing much larger output unnecessarily. For JavaScript, DOMParser or creating a temporary textarea element are reliable ways to decode entities client-side without a library.