HTML Entity Encoder
Escape characters like <, >, & and quotes as HTML entities, optionally including symbols and all non-ASCII characters.
What is the HTML Entity Encoder?
HTML entities let you display characters that would otherwise be interpreted as markup, which also prevents HTML injection when showing user text.
How does it work?
Each character is replaced with its named entity (such as <) or a numeric reference (such as ₹) depending on the mode.
Example
<b>Tom & Jerry</b> becomes <b>Tom & Jerry</b>.
Frequently asked questions
Is my data sent to a server?
No. This tool runs entirely in your browser; nothing you paste is uploaded or stored.
Is this enough to prevent XSS?
Escaping text content is essential, but attributes, URLs and scripts need context-specific encoding. Use your framework’s built-in escaping.
Related tools
Enable JavaScript to use this calculator.