HTML Entities
Convert text and HTML entities live, in either direction, with named or numeric formats.
Free & unlimited
Direction
Entity scope
Text
37 chars
Entities
<p>Café & "quotes" — naïve résumé</p>
89 chars
All processing happens in your browser. No data is sent to any server.
About this tool
- 1
Enter your text
Paste HTML content or plain text containing special characters into the input area.
- 2
Choose the operation
Select Encode to convert special characters to HTML entities, or Decode to convert entities back to characters.
- 3
Select encoding style
Choose between named entities (&), numeric entities (&), or hexadecimal entities (&).
- 4
Copy the result
Copy the encoded or decoded text from the output panel.
- Always encode user-generated content displayed in HTML to prevent XSS (cross-site scripting) attacks.
- Named entities (e.g., &) are more readable; numeric entities (e.g., &) have broader compatibility.
- Common entities to know: & for &, < for <, > for >, " for ", and ' for '.
- Use decode to clean up HTML content that was double-encoded or to extract readable text from HTML source.
- Supports named, numeric, and hexadecimal entity formats
- Encodes all HTML5 named entities
- Real-time encoding and decoding as you type
- Reference table of common HTML entities
- Handles Unicode characters and emoji encoding
- Encode special characters in HTML content to prevent rendering issues
- Sanitize user input before displaying it in web pages to prevent XSS attacks
- Decode HTML entities in scraped web content to extract plain text
- Prepare code snippets for display in HTML without the browser interpreting the tags
Named entities use a mnemonic (e.g., &) while numeric entities use the Unicode code point (e.g., &). Named entities are more readable but not available for every character.
At minimum, encode < (<), > (>), & (&), " ("), and ' (') to prevent HTML parsing issues and security vulnerabilities.
Yes. Emoji and other Unicode characters can be encoded as numeric HTML entities (e.g., 😀 for a smiley face).