Back to tools
HTML Entity Encoder
Encode and decode HTML entities. Convert special characters to their HTML equivalents and back.
<h1>Hello & "World"!</h1>
About This Tool
HTML Entity Encoder converts special characters to their HTML entity equivalents and back. Characters like <, >, &, quotes, and non-ASCII symbols are encoded to safe HTML representations that render correctly in all browsers.
There are two encoding modes: named entities (&, <, >) and numeric entities (&, <, >). Named entities are more readable; numeric entities work in any character encoding. Both are valid HTML.
HTML encoding is essential for preventing XSS (Cross-Site Scripting) attacks when displaying user-provided content in HTML. All encoding runs in the browser using DOM-based character conversion.