<

HTML Entity Encoder

Encode and decode HTML entities. Escape special characters like , , &, and " for safe HTML.

How to Use

  1. Paste your HTML or plain text into the Input field on the left.
  2. Click Encode to convert special characters like <, >, &, and " into HTML entities.
  3. 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>&lt;</code> represents <code>&lt;</code> and <code>&amp;amp;</code> represents <code>&amp;</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>&amp;</code>, <code>&lt;</code>, <code>&gt;</code>, <code>"</code>, and <code>'</code> — the five most commonly reserved HTML characters.