HTML Entity Encoder / Decoder
Encode special characters to HTML entities, or decode them back.
Last updated August 26, 2026
About this tool
Characters like <, >, and & have special meaning in HTML, so displaying them literally on a web page (e.g. showing example code, or a user's name containing an ampersand) requires converting them to HTML entities like < and &. This tool encodes reserved and non-ASCII characters into their entity form, or decodes entities back to plain text.
Common HTML entities
| Character | Entity |
|---|---|
| & | & |
| < | < |
| > | > |
| " | " |
| ' | ' |
| non-breaking space | |
Frequently asked questions
Why does unescaped user input in HTML matter for security?
Rendering user-supplied text directly into HTML without encoding characters like < and > can allow cross-site scripting (XSS) attacks, where an attacker injects executable script tags into your page.
What's the difference between named and numeric entities?
Named entities like & are easier to read but only cover a limited set of characters. Numeric entities like é (for é) can represent any Unicode character and are what this tool uses for anything outside the small named set.