Developer tools
HTML Entity Encoder
Safely encode special characters in text as HTML entities. For example, an ampersand becomes & and a less-than sign becomes <.
- Free to use · no account required
- Processes input in your browser
- Review and copy your results
Enter your details
Your result appears here.
Step by step
How to use HTML Entity Encoder
Prepare your input
Paste text containing characters that need to be represented as HTML entities.
Run the tool
Choose Encode text to encode ampersands, angle brackets and quote characters.
Check and use the result
Copy the encoded text into the appropriate text context in your HTML.
How this tool works
The tool replaces the special characters ampersand, less-than, greater-than, quotation marks and apostrophes. Your text is processed directly in the browser. No account or upload is required.
Good to know
Frequently asked questions
Does this make any HTML context safe?
No. HTML text, attributes, JavaScript, CSS and URLs need different context-aware handling. This utility is not a complete HTML sanitizer.
Is HTML Entity Encoder free?
Yes. This public tool does not require an account, payment or subscription.
Where is my input processed?
The tool-specific processing runs in your browser. Website delivery still involves hosting requests; see the privacy policy for details. Read the privacy policy.