HTML Entity Encoder & Decoder
HTML Entity Encoder & Decoder escapes characters such as &, <, > and quotes into HTML entities so they are safe in markup, and decodes named, decimal and hexadecimal entities back into text. It runs in your browser.
How to use HTML Entity Encoder & Decoder
- Paste your text or HTML.
- Choose encode or decode.
- Copy the result.
Frequently asked questions
Why do I need to escape HTML?
Characters such as < and & have a meaning in HTML. Escaping them makes the browser show them as text instead of reading them as markup.
Which entities can it decode?
Named entities such as the ampersand and copyright signs, and decimal and hexadecimal numeric entities.
Is escaping enough to stop cross-site scripting?
Only when you escape for the right place. Text inside HTML needs entity escaping, but attributes, URLs and scripts need their own rules. Use your framework's escaping where you can.
Next step
Working with links instead? Percent-encode a URL. Open URL Encoder & Decoder.