HTML Encoder/Decoder

Convert HTML special characters to entities and vice versa

Input HTML
0 characters
Encoding Options
Common HTML Entities
Character Entity Name Entity Number Description
< &lt; &#60; Less than
> &gt; &#62; Greater than
& &amp; &#38; Ampersand
" &quot; &#34; Double quote
' &apos; &#39; Single quote/apostrophe
  &nbsp; &#160; Non-breaking space
© &copy; &#169; Copyright symbol
Result
Show Preview
0 characters
When to Use HTML Encoding

HTML encoding is important in web development for:

  • Security: Preventing XSS attacks by encoding user input
  • Display: Showing HTML code examples on web pages
  • Compatibility: Ensuring special characters display correctly
  • Validation: Making sure HTML is properly formed
Tip: Always encode user input before displaying it on your website to prevent cross-site scripting (XSS) attacks.