HTML Entity Encoder / Decoder
Encode special characters to HTML entities (&, <, >, "…) or decode them back to plain text. Supports named entities, decimal (&), and hex (&) forms. Essential for safely embedding user input in HTML.
Ctrl+Enter to run · Ctrl+K to switch tools · Recent button shows input history
Let AI do the hard part. Fix broken HTML, convert to email-safe HTML, or clean up any markup in one click — 3 free AI runs per day, no account needed.
Try the AI HTML FixerFAQ
Why encode HTML entities?
To prevent HTML injection and XSS attacks. Characters like <, >, &, and " must be encoded when inserted into HTML to avoid being interpreted as markup.
What is the difference between &amp; and &?
Both represent the ampersand character (&). Named entities (&) are human-readable; decimal (&) and hex (&) are numeric representations of the same Unicode code point.