HTML entity encoder & decoder
Encode special characters as HTML entities or decode named and numeric references.
Processed in this browser · nothing is uploaded
Result
Ready when you areEnter your input and run the tool to see your result here.
Good to know
Represents characters such as < and & as < and &. Decoded content is displayed as text and never executed as HTML. This tool does not replace context-aware sanitization.
Operation: encode Input: <p>안녕 & hello</p>
Understand and use your results
Display HTML examples in documentation or read entity-encoded text. Results are shown as copyable text rather than executed HTML.
How to use it
- Encode to represent special characters as entities, or decode to restore text.
- Check angle brackets and ampersands, then copy for the intended context.
Worked example
<p>Hi & bye</p> (decode)
<p>Hi & bye</p>
< represents < and & represents &. Even tag-like output is displayed only as text here. Encoding an already encoded string can produce nested entities such as &lt;.
Is this an XSS protection tool?
No. HTML text, attributes, JavaScript and URLs need different protections. Inserting decoded output into innerHTML elsewhere can be unsafe. Use context-aware escaping and validation in the actual application.