RevealTheme logo

HTML Entity Encoder & Decoder

Convert special characters to HTML entities (&, <, etc.) and back. Useful for safely embedding text in HTML.

What is HTML Entity Encoder & Decoder?

HTML entities are escape sequences that represent characters with special meaning in HTML — &amp; for &, &lt; for <, etc. If you embed user-provided text directly into HTML without encoding, you create XSS vulnerabilities. This tool converts text to entity-encoded HTML for safe embedding, or decodes entity-encoded HTML back to plain text.

Frequently asked questions

Which characters must I encode?
At minimum: < > & " '. These have special meaning in HTML and can break parsing or create XSS.
Should I encode all entities or just unsafe ones?
For modern UTF-8 pages, encode only the unsafe ones (&, <, >, ", '). Encoding everything bloats the HTML.

Related tools