HTML Entity Encoder & Decoder
Convert special characters to HTML entities and back. 100% client-side — your data never leaves your browser.
No data sent to serverRelated Tools
What are HTML Entities?
HTML entities are escape sequences that let you display characters with special meaning in HTML — or characters hard to type. The most critical: < for <, > for >, & for &. Without escaping, the browser interprets these as HTML markup, breaking your page layout — or worse, creating XSS vulnerabilities.
Three entity formats
The HTML5 spec (WHATWG Living Standard) defines three equivalent ways to encode a character:
- Named entities:
©(©),→(→),—(—) - Decimal numeric:
©(©) — Unicode code point in decimal - Hex numeric:
©(©) — Unicode code point in hex
When to encode
- Displaying user input on an HTML page (always — XSS prevention)
- Showing code samples in
<pre>blocks - Embedding HTML strings inside attribute values
- Storing HTML in databases that serve to untrusted clients
- Email templates with user-supplied content
⚠️ Reference Only
Output is generated based on your input and is provided for reference. Results may vary depending on your specific use case, edge cases, or environment-specific behavior. We do not guarantee accuracy of conversions, validations, or computed values.
Always verify critical outputs against official documentation or production environments. We are not responsible for any decisions or losses based on these tool results.
📖 Related Guides
Color Formats — HEX, RGB, HSL, OKLCH
Modern CSS color formats explained. When to use OKLCH for perceptual uniformity.
REST vs GraphQL vs gRPC — Choosing an API Paradigm
Trade-offs across performance, tooling, type safety, and team shape. When to use each.
UUID v4 vs ULID — Which to Choose?
Compare UUID v4 and ULID for distributed systems. Performance, sortability, and use cases.