DataWorkbench
All Tools

History and favorites reset automatically after 30 days of inactivity.

html entity encode decode escape xss special characters

HTML Entity Encoder / Decoder

Encode special characters like < > & to HTML entities (&lt; &gt; &amp;), or decode entities back to characters. Useful for XSS prevention and HTML template creation.

USAGE

3 simple steps

  1. 1Paste text into the input field
  2. 2Select Encode or Decode direction
  3. 3Click Convert to see the result

FAQ

Frequently Asked Questions

Q. Can named entities like &amp;nbsp; also be converted?

A. Decoding supports named entities including &amp;nbsp;, &amp;copy;, and &amp;mdash;. Encoding only converts the 5 basic characters: &amp;lt; &amp;gt; &amp;amp; &amp;quot; &amp;#39;.

Q. Are non-ASCII characters encoded to entities?

A. Only basic ASCII special characters (< > & " ') are entity-encoded. Non-ASCII text is output as-is.