HTML Entity Encoder

Convert special characters to HTML entities. Choose between named, decimal, or hexadecimal formats.

0 chars, 0 lines
0 chars, 0 lines

Options

Statistics

Characters: 0
Words: 0
Lines: 0
Entities: 0
Bytes: 0

Quick Reference

& → &
< → &lt;
> → &gt;
" → &quot;
' → &apos;

About HTML Entity Encoding

HTML entity encoding is essential for web development and content security. It converts special characters that have meaning in HTML into their entity equivalents, preventing them from being interpreted as code.

When to Use HTML Encoding

  • Displaying user-generated content safely
  • Showing code examples in documentation
  • Preventing XSS (Cross-Site Scripting) attacks
  • Ensuring proper rendering in email clients
  • Storing HTML content in databases or XML files

Encoding Formats Explained

Named Entities - Human-readable format
& → &amp;
< → &lt;
> → &gt;
Decimal Entities - Numeric character references
& → &#38;
< → &#60;
> → &#62;
Hexadecimal Entities - Base-16 character codes
& → &#x26;
< → &#x3C;
> → &#x3E;

Related Tools

HTML Decoder

Decode HTML entities back to text