HTML Entities Encoder / Decoder

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 (&lt;, &gt;, etc.)
  • Works with emoji and supplementary Unicode characters (handles surrogate pairs).