05 // Unicode, Symbol & Encoding WorkbenchHTML-ENTITY-CODEC
HTML Entity Encoder & Numeric Character Reference Decoder
HTML character references escape reserved markup delimiters (`<`, `>`, `&`, `"`, `'`) to prevent XSS injection and represent arbitrary Unicode code points in ASCII-only documents.
Encoded Output
<div data-math="a ≤ b & c ≥ d">Cost: €49 — ∑xᵢ</div>
Decoded Output
<div data-math="a ≤ b & c ≥ d">Cost: €49 — ∑xᵢ</div>
Was this tool helpful?
Reference Table
- 01Always escape `&`, `<`, `>`, `"`, and `'` when interpolating untrusted text into raw HTML contexts.
- 02Hexadecimal references (`∑`) match Unicode `U+2211` directly, whereas decimal (`∑`) uses base-10.
Frequently Asked Questions
Which 5 characters are mandatory to escape for HTML XSS safety?+
`&` (`&`), `<` (`<`), `>` (`>`), `"` (`"`), and `'` (`'` or `'`).
Does XML support HTML named entities like ` ` or `—`?+
Strict XML (including standalone `.svg` files!) only predefines 5 named entities (`&`, `<`, `>`, `"`, `'`); use numeric ` ` or raw UTF-8 inside SVG/XML.
What is the difference between `∑` and `∑`?+
Both render `∑`: `∑` is decimal `8721`, while `∑` is hexadecimal `0x2211` (`8721` in hex).