HTML Entity Encoder/Decoder
Convert special characters to HTML entities and back. Optional full mode encodes all non-ASCII.
Quick answer: Convert special characters to HTML entities and back. Optional full mode encodes all non-ASCII.
Last updated
Frequently asked questions
- How do I encode HTML entities?
- Switch to Encode, paste your text, and the entity-encoded output appears immediately. Toggle 'all non-ASCII' to numerically encode emoji and accents too.
- How do I decode HTML entities?
- Switch to Decode, paste text containing entities, and you get plain text back. Both named (&) and numeric (', /) entities are supported.
- Which characters does basic encode cover?
- &, <, >, ", and ' — the five characters that can break HTML or open XSS holes when interpolated naively into markup.
- What does 'all non-ASCII' do?
- Numerically encodes every character above 0x7E (accented letters, emoji, CJK). Useful when your output is constrained to ASCII.
- Is this safe for XSS prevention?
- Encoding & < > " ' protects HTML attribute and text contexts but not URLs or JavaScript contexts. Always combine with framework-level escaping.
- Are named entities decoded?
- Yes — common ones like © — … and the five must-have entities. Numeric entities cover everything else.
- Is the text sent to a server?
- No. Encoding and decoding run entirely in your browser.
- Why does my output differ from another tool?
- Some tools encode optional characters like `/`. We stick to the safe minimum unless you turn on 'all non-ASCII'.
- Can I encode emoji?
- Yes — turn on 'all non-ASCII' and emoji become 😀 etc. Decoding back to characters works too.
- Is this HTML entity tool free?
- Yes — free, no signup, no limits.