HTML Entity Encode
Replace five syntax-sensitive characters with deterministic HTML character references. Encoding is context support, not universal HTML sanitization.
Encode HTML-Sensitive Characters
Deterministic Output Profile
| Character | Output |
|---|---|
| & | & |
| < | < |
| > | > |
| " | " |
| ' | ' |
HTML Context Still Matters
Encoding these characters is appropriate for many HTML text-node and quoted-attribute demonstrations, but complete output safety depends on where the value is inserted.
This tool does not parse, sanitize, or approve arbitrary markup, CSS, JavaScript, URLs, DOM APIs, or template expressions.
Avoid Recursive Encoding
- Already encoded ampersands are encoded again because the operation is deterministic and one-pass.
- Apply encoding at the final output boundary rather than repeatedly transforming stored data.
- Use URL encoding for URL values, not HTML entities.
Questions About This Tool
The ampersand is encoded in a one-pass deterministic operation. The tool does not guess whether source text was already encoded.
No. Safe output depends on the insertion context and the framework or DOM API used.
No. Encode URL component values with the URL tool, then HTML-escape the complete link only when placing it in HTML.