Convert characters like <, >, and & to HTML entities, or decode entities back to normal text. Useful when writing markup, email templates, or escaped JSON strings.
HTML entities
Encode plain text for safe HTML, or decode entity strings back to characters.
How to use HTML entities
- Paste text that needs encoding or decoding.
- Run encode to make HTML-safe text, or decode to read entities.
- Copy the output into your template or document.
Example: <script> becomes <script> when encoded for HTML.
Frequently asked questions
- Why encode HTML entities?
- Encoding characters like less-than and ampersand prevents the browser from treating user text as markup, which avoids broken layouts and injection issues.
- Does this prevent all XSS?
- Entity encoding is one helpful layer, but real applications still need proper output escaping and a content security policy on the server side.