HTML entity encode/decode · Guide
Common HTML Escaping Mistakes
Escaping is easy to overdo or underdo. These are the mistakes to watch for.
Double-encoding
Encoding already-encoded text turns & into &, which displays the entity rather than the character. Encode each value once, at output time.
Forgetting attribute context
Text inside an attribute needs quotes escaped, not just angle brackets. Escaping for the wrong context leaves a hole. Match the encoding to where the value lands.
Frequently asked questions
Can I use this for production work?
Yes, for inspection, formatting and quick generation. Still review the output before committing it to production code or configuration.
Ready to try it?
Open the free browser-based HTML entity encode/decode and apply what you just read — no sign-up, runs locally.
Open the HTML entity encode/decode tool