HTML Entities: How to Escape Special Characters
HTML entities let you display characters like < > & and quotes without breaking your markup. Learn the core entities and when escaping matters.
HTML entities are codes that represent characters which would otherwise be interpreted as markup. For example, < is written as < and & as &, so the browser shows the character instead of treating it as a tag.
The must-know entities
<→<>→>&→&"→"'→'
Named vs numeric
Entities come in two forms: named (©) and numeric (©, or hex ©). Numeric entities can represent any Unicode character, even when no name exists.
Why it matters
Escaping is essential for security and correctness: user text containing <script> must be escaped so it renders as text, not executable code. This is a first line of defense against injection.
Encode or decode now
Convert text and entities both ways in the HTML entity tool. For characters inside URLs, see What is URL encoding.