HTML Escape
Escapes or unescapes an HTML string, replacing characters that could be wrongfully interpreted as markup with their HTML entities.
Loading tool...
HTML escaping explained
Why escape HTML?
In HTML <, > and & have special meaning. When they appear in content, they must be replaced by character references, otherwise the browser interprets them as markup. Forgetting to escape is the root cause of XSS vulnerabilities.
Rules applied
| Character | Escaped as | Why |
|---|---|---|
& |
& |
Starts every character reference |
< |
< |
Opens a tag |
> |
> |
Closes a tag |
" |
" |
Delimits attribute values |
' |
' |
Delimits attribute values |
Unescaping
Understands named ( ), decimal ( ) and hexadecimal ( ) character references.