Input
Output
How it works
- Standard HTML encode — encodes only reserved HTML characters (
<,>,&,",') and leaves other characters unchanged unless browser encodes them. - Numeric encode — encodes:
- All non-ASCII characters (
code > 127) into&#NNNN; - Reserved HTML characters into entities (
<,>, etc.)
- All non-ASCII characters (
- Works with emoji and supplementary Unicode characters (handles surrogate pairs).