FINAL TOOLBOX
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 (`&#x2211;`) match Unicode `U+2211` directly, whereas decimal (`&#8721;`) uses base-10.

Frequently Asked Questions

Which 5 characters are mandatory to escape for HTML XSS safety?+

`&` (`&amp;`), `<` (`&lt;`), `>` (`&gt;`), `"` (`&quot;`), and `'` (`&#39;` or `&apos;`).

Does XML support HTML named entities like `&nbsp;` or `&mdash;`?+

Strict XML (including standalone `.svg` files!) only predefines 5 named entities (`&amp;`, `&lt;`, `&gt;`, `&quot;`, `&apos;`); use numeric `&#160;` or raw UTF-8 inside SVG/XML.

What is the difference between `&#8721;` and `&#x2211;`?+

Both render `∑`: `&#8721;` is decimal `8721`, while `&#x2211;` is hexadecimal `0x2211` (`8721` in hex).