DevToolNow

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 server
Plain Text Input
HTML Entities Output
Ctrl+Enter
Common HTML Entities Reference
<&lt;
>&gt;
&&amp;
"&quot;
'&apos;
©&copy;
®&reg;
&trade;
&euro;
£&pound;
°&deg;
&hellip;

Related 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: &lt; for <, &gt; for >, &amp; 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: &copy; (©), &rarr; (→), &mdash; (—)
  • Decimal numeric: &#169; (©) — Unicode code point in decimal
  • Hex numeric: &#xA9; (©) — 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.