$ html-entity-encoder-decoder

Encode or decode HTML special characters like < > & ".

input
0 characters
output
Result
faq
What are HTML entities?+
HTML entities are special codes that represent reserved characters. For example, &lt; represents <, &amp; represents &, and &quot; represents ".
When should I encode HTML?+
Always encode user-generated content before inserting it into HTML to prevent XSS attacks. Encode data in HTML attributes, text nodes, and inline scripts.
What is the difference between named and numeric entities?+
Named entities like &amp; are easier to read. Numeric entities like &#38; or &#x26; work for any Unicode character. Both render the same.
related tools