HTML Entity Encoder
Encode and decode HTML entities. Escape special characters like , , &, and " for safe HTML.
How to Use
- Paste your HTML or plain text into the Input field on the left.
- Click Encode to convert special characters like
<,>,&, and"into HTML entities. - Click Decode to reverse the process. Use the Copy button to grab the result.
Frequently Asked Questions
- What are HTML entities?
- HTML entities are special character sequences that represent reserved HTML characters. For example, <code><</code> represents <code><</code> and <code>&amp;</code> represents <code>&</code>.
- Why do I need to encode HTML?
- When embedding user-generated content in HTML, encoding prevents XSS (cross-site scripting) attacks by ensuring special characters are treated as text, not markup.
- Which characters are encoded?
- This tool encodes <code>&</code>, <code><</code>, <code>></code>, <code>"</code>, and <code>'</code> — the five most commonly reserved HTML characters.