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 <, & is &. 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
- Paste your text or entity-encoded string.
- Click Encode or Decode.
- 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.