Numeric HTML entities reference characters by their Unicode code point rather than by name, so any character at all can be written in pure ASCII. This tool encodes text to decimal or hexadecimal numeric references and decodes them back.
How it works
Encoding reads each Unicode code point of the input and emits it as a numeric reference in the base you choose:
decimal: char -> &#<codePoint>; "A" -> A " " ->  
hex: char -> &#x<HEXcodePoint>; "A" -> A " " ->  
Because it works on full code points (via the string iterator), characters above
U+FFFF such as emoji become one entity, not a broken surrogate pair. Decoding
parses &#NN; and &#xNN;, converts the number to a code point, and rebuilds
the original character with String.fromCodePoint.
Example and notes
The word café encoded as decimal becomes café, and the
non-breaking space U+00A0 becomes   in hex. If you only need to make
markup safe to display while keeping text human-readable, the named-entity tool
is usually a better choice; numeric encoding shines when you need a fully
ASCII-safe, encoding-independent representation.