HTML Entity Encoder/Decoder

Convert special characters like <, >, and & into their HTML entity equivalents or decode them back into readable text.

Input String
Result

Result will appear here...

Status: Awaiting Input

What are HTML Entities?

In HTML, some characters are reserved. For example, you cannot use the less than (<) or greater than (>) signs directly in your text because the browser will interpret them as tags.

To display these characters, you must use HTML entities. They start with an ampersand (&) and end with a semicolon (;).

Security Note

Encoding character entities is a key part of preventing **Cross-Site Scripting (XSS)** attacks. By encoding characters like < and >, you ensure that user-provided input cannot be executed as script by the browser.

This tool uses the comprehensive `he` library to handle all named and numeric entities correctly.