Skip to content
🔣

HTML Entity Encoder/Decoder

Encode HTML special characters to entities and decode HTML entities back to text. Named (&), decimal (&), or hex (&) format.

 

How does the HTML entity encoder work?

HTML entities are special character references that prevent characters from being interpreted as HTML markup. Encoding converts characters like <, >, and & to their entity forms (&lt;, &gt;, &amp;). Decoding reverses the process. Named entities use HTML5's standard names; decimal and hex use Unicode code points.

Common uses

  • Display code in HTML — show <div> as text without rendering it.
  • XSS prevention — escape user input before injecting into HTML.
  • Email templates — display special characters reliably.
  • Documentation — show literal HTML markup in tutorials.

Privacy

All conversion runs 100% in your browser. No data is sent to any server.