Developer Tools

HTML Entity Encoder

Escape HTML special characters to entities — or decode &-style entities back.



About this tool

To display <code> or other markup as text on a web page, the special characters must become entities: < is &lt;, & is &amp;. Encode any snippet for safe embedding, or decode entity-filled text back to plain characters.

Everything runs locally in your browser — nothing is uploaded, logged or stored.

How to use

  1. Paste your text or entity-encoded string.
  2. Click Encode or Decode.
  3. Copy the result.

Frequently asked questions

The big five: & < > " and '. Escaping them prevents markup injection and rendering glitches.

Escaping output is a core XSS defense, but context matters — attributes, URLs and scripts each need appropriate escaping.

Yes — decoding uses the browser's own HTML parser, so all named and numeric entities work.