Free Online HTML Entity Encoder & Decoder
Convert special characters to their HTML entity equivalents or decode HTML entities back to readable text. Essential for safely embedding content in HTML.
Example
Input
<p class="test">Hello & goodbye</p>Output
<p class="test">Hello & goodbye</p>How to Use the HTML Entity Encode/Decode
1
Paste text with special characters or HTML entities into the input.
2
Click Encode to convert to entities or Decode to convert back.
3
Copy the result for use in your HTML.
Frequently Asked Questions
What are HTML entities?
HTML entities are special codes that represent characters that have meaning in HTML (like < > & ") or characters not on your keyboard. For example, & represents &.
When should I use HTML encoding?
Use HTML encoding when displaying user input in web pages to prevent XSS attacks, or when you need to show HTML code as text.
Does it handle all entities?
Yes. It handles named entities (like &), decimal entities (like &), and hexadecimal entities (like &).