HTML Encoder / Decoder

Convert special characters to HTML entities for safe display in web pages — or decode entities back to readable text. Both directions update live as you type.

How it works

HTML reserves a handful of characters for its own markup: <, >, &, and quotes. To display these characters as text on a web page instead of having the browser interpret them as code, they are replaced with entities — for example, < becomes &lt; and & becomes &amp;. Encoding your input this way is also the standard defense against cross-site scripting, since injected markup can no longer execute. Characters outside basic ASCII, like “—” or “€”, are converted to numeric entities such as &#8212; so they survive any character encoding. Decoding reverses the process, turning named entities (&copy;), decimal references (&#169;), and hexadecimal references (&#xA9;) back into their characters.