HTML Entity Encoder and Decoder
Encode characters with meaning in HTML syntax or decode valid entity references into readable characters.
This guide and page information are in English. Some controls inside the interactive tool currently appear in Turkish.
This tool processes its main input in your browser and does not send it to an external API. Fonts and interface assets may load from external providers.
HTML Entity Encoder and Decoder
The HTML entity converter changes characters such as ampersands and angle brackets into references that can be written inside HTML text. It is useful for displaying code examples or literal markup.
Entity encoding is not a complete defense against injection. For untrusted input, use a tested sanitizer appropriate to the context in your application.
How to use it
- Enter characters or entity references.
- Choose encode or decode.
- Review the result in the HTML context where it will be used.
Example
Input: A < B & C
Output: A & < B & C
Who is it for?
- Web developers
- Content editors
- People writing HTML learning materials
Privacy and limitations
Character conversion runs in this browser and the text is not sent to an API.
Frequently asked questions
Does entity encoding prevent XSS?
Not by itself. Security requires context-aware escaping and sanitization for HTML, attributes, URLs and scripts.
What does `&` mean?
It is the HTML character reference for an ampersand, which also begins other entity references.
Does every character have a named entity?
HTML defines many named and numeric references, but not every Unicode character has a familiar name.
Is the input saved?
Conversion takes place in this page and the input is not sent to an API for processing.