HTML Entity Encoder & Decoder
Show code as text on a web page, or turn entities back into readable characters.
- Free & unlimited
- No sign-up
- Instant results
How to use the HTML Entity Encoder & Decoder
- Choose Encode or Decode.
- Paste your text or HTML.
- Copy the result.
Why escape HTML?
Characters like < and & have meaning in HTML. To show code examples on a page, or to put user text into HTML safely, they must be written as entities: <, &. Escaping user input is a key defence against XSS attacks.
Decoding
The decoder understands named entities (©, ), decimal (©) and hex (©) forms.
Frequently asked questions
Which characters are encoded?
&, <, >, double and single quotes. Tick the option to also encode all non-ASCII characters.
Is decoding safe?
Yes, the decoder never runs the HTML, it only converts entities to characters.
Is anything uploaded?
No, it runs in your browser.
Related tools
URL Encode & Decode
Percent-encode or decode URLs and split them into parts.
Base64 Encode & Decode
Encode text to Base64 or decode Base64, UTF-8 safe.
Find and Replace Text
Replace words or patterns across any text, with regex support.
JSON Formatter & Validator
Format, validate and minify JSON with clear error messages.