What is HTML Entities?
HTML entity encoding turns characters like < > & " into safe equivalents (< > & ") so they render correctly and prevent XSS when injecting user input.
How to use
- Paste your text or HTML.
- Pick Encode or Decode.
- Copy the output.
Example
Use this sample to confirm what HTML Entities does before pasting your own data.
<div class="hi">Hello & welcome</div>
<div class="hi">Hello & welcome</div>
When to use it
Use HTML Entities for quick local checks, debugging, documentation prep, and one-off conversions where opening a full IDE or command-line workflow would be slower. For production-critical data, always review the output before committing or shipping it.
Frequently asked questions
Which entities does it cover?
All named HTML5 entities plus numeric character references.
Is this safe for sanitizing user input?
Encoding is one step. For full XSS protection use a sanitizer like DOMPurify in your render pipeline.