HTML Entity Encoder and Decoder
Make text safe to show inside a web page by escaping characters such as < and &, or decode entities back into readable characters.
Runs in your browser. What you enter here is not sent to our server.
- Encode and decode
- Named and numeric entities
- Optional ASCII-only output
How to use the HTML Entity Encoder and Decoder
- Choose Encode or Decode.
- Paste your text or HTML.
- Copy the result.
Why characters need escaping
Browsers read < as the start of a tag and & as the start of an entity. To display those characters as text, for instance when showing a code sample, they must be written as < and &. Escaping user-supplied text before placing it in a page is also a basic defence against script injection.
Questions about the HTML Entity Encoder and Decoder
Do I need to encode accented letters?
Not on pages served as UTF-8, which is nearly all of them today. The option exists for older systems that only accept plain ASCII.
Which entities can be decoded?
All named entities your browser knows, such as © and , as well as numeric ones like © and ©.