HTML Entity Encode/Decode
Encode special characters to HTML entities or decode them back. Supports named, decimal, and hexadecimal entities.
What Are HTML Entities?
HTML entities are special codes used to represent characters that have reserved meaning in HTML or that can't be easily typed on a keyboard. For example, the less-than sign < is written as < because the browser would otherwise interpret it as the start of an HTML tag. Similarly, & becomes &, and special characters like ยฉ, โฌ, and โ have their own named entities.
There are three formats for HTML entities: named entities like ©, decimal numeric entities like ©, and hexadecimal numeric entities like ©. Named entities are the most readable, but numeric entities can represent any Unicode character โ even those without named equivalents. All three formats are decoded the same way by browsers.
This HTML entity encoder/decoder converts between plain text and all three entity formats. It handles over 250 named entities including Latin characters, typography symbols, currency signs, mathematical operators, Greek letters, and arrows. All processing happens in your browser โ your content never leaves your machine.
How to Encode and Decode HTML Entities
- Enter your text โ Paste plain text containing special characters (to encode) or text with HTML entities (to decode) into the input field.
- Choose your encoding format โ Select "Named" for readable entities like
©, "Decimal" for numeric codes like©, or "Hex" for hexadecimal codes like©. - Click Encode or Decode โ Click "Encode โ" to convert special characters to entities, or "โ Decode" to convert entities back to readable characters.
- Copy or swap โ Copy the result to your clipboard, or click "โ Swap" to move the output back to the input for further processing.
Key Features
- Three encoding modes โ Named entities (
©), decimal (©), and hexadecimal (©) for full flexibility. - 250+ named entities โ Comprehensive coverage including Latin-1 supplement, typography, currency, math symbols, arrows, and Greek letters.
- Bidirectional conversion โ Encode special characters to entities or decode entities back to characters with one click.
- Reference table โ Built-in quick reference showing the most commonly used HTML entities and their character equivalents.
- Swap function โ Instantly swap input and output for iterative encoding/decoding workflows.
- 100% client-side โ Your content never leaves your browser. No server, no uploads, no tracking.
Common Use Cases
- Escaping HTML for display โ Encode user input or code snippets so they render as text instead of being interpreted as HTML tags.
- Email template development โ Encode special characters in HTML emails to ensure consistent rendering across email clients.
- Fixing garbled text โ Decode double-encoded entities or fix text that shows raw entity codes instead of proper characters.
- CMS and blog content โ Encode symbols like ยฉ, โข, โฌ, and โ for use in HTML content where Unicode support is uncertain.
- Security (XSS prevention) โ Encode user-generated content before inserting it into HTML to prevent cross-site scripting attacks.
Frequently Asked Questions
๐ This tool runs entirely in your browser. No data is sent to any server.