HTML Entity Encoder and Decoder
Convert characters like < > & and quotes to HTML entities, or turn entities back into normal text.
Your data stays on your device.
Free, no sign-up needed.
Features
- Encode and decode
- Optional numeric codes for all non-ASCII characters
- Understands named and numeric entities
- Runs on your device
How to use HTML Entity Encoder & Decoder
- Choose encode or decode.
- Paste your text.
- Copy the result.
Frequently asked questions
Why encode HTML?
Characters such as < and & have a special meaning in HTML. Writing them as < and & makes the browser show them as text instead of reading them as code.
Which characters are encoded?
The ampersand, less than, greater than and both kinds of quotes. Tick the extra option to also encode accents and symbols as numeric codes like é.
Does decoding run any scripts?
No. Decoding only reads the text with the browser's HTML parser. Nothing is executed or inserted into the page.
Does encoding protect against XSS?
It is part of it, but safe output depends on where the text is placed. Use the escaping built into your framework when you build pages.