HTML Escape Tool: Encoding Special Characters Safely
When you want to display HTML code as text instead of having it rendered, special characters like <, >, &, " need to be escaped to their entity forms. This tool handles that conversion both ways.
HTML reserves certain characters for syntax: < starts a tag, & starts an entity, " delimits attributes. To display these characters literally in HTML, they have to be escaped: < becomes <, > becomes >, & becomes &, " becomes ". This is essential for showing code samples or any user-provided text inside HTML.
The reverse — unescaping — converts the entities back to their original characters, useful when reading HTML source or processing data that's already escaped.
Common HTML entities
| Character | Entity | Numeric |
|---|---|---|
| < | < | < |
| > | > | > |
| & | & | & |
| " | " | " |
| ' | ' | ' |
| non-breaking space | |   |
Extended FAQ
Why does '&' need escaping?
Because & itself starts an HTML entity. If you write 'A & B' in HTML, browsers may try to interpret '& B;' as an entity. Escaping & to & makes the literal ampersand unambiguous.
Is escaping the same as URL encoding?
No — different contexts use different escaping rules. URL encoding (percent-encoding) uses %20 for space; HTML uses . Don't mix them.
Are my pasted strings stored?
No — runs entirely in your browser.
