Free Online HTML Entity Encoder & Decoder

Encode special HTML characters to their entity equivalents (& → &) or decode HTML entities back to plain text. Essential for safe HTML templating and debugging.

Related Tools

Frequently Asked Questions

When should I encode HTML entities?

Encode user-supplied content before inserting it into HTML to prevent XSS attacks. Characters like <, >, &, and " must be encoded so browsers treat them as text rather than HTML markup.

What is the difference between named and numeric entities?

Named entities use a short descriptor (e.g., &amp; for &, &lt; for <). Numeric entities use the Unicode code point in decimal (&amp;#38;) or hex (&amp;#x26;). Named entities are more readable; numeric entities work in any context.

Does encoding HTML entities affect page performance?

Negligibly. Modern browsers parse HTML entities extremely fast. The security benefit of proper encoding far outweighs any theoretical micro-cost.