Skip to main content

HTML Entity Encoder & Decoder

Everything is processed in your browser. Nothing is uploaded.

About this tool: HTML Entity Encoder & Decoder

HTML entities write special characters as safe text, such as &lt; for < and &amp; for &. Encoding is how you show markup as text on a page and avoid breaking HTML, while decoding turns entities back into the characters they represent.

Common uses

  • Decoding a Base64 value found in a header or config file
  • Percent-encoding a query parameter that contains spaces or symbols
  • Embedding a small image in CSS or HTML as a data URI

Frequently asked questions

Does encoding prevent XSS?
Encoding output for the right context is a core defense, but it must be applied where the data is inserted. Use your framework escaping rather than manual steps in production.
Are named and numeric entities both supported?
Yes. Both &copy; and &#169; decode to the same character.