HTML Entity Encoder & Decoder
Convert special characters to HTML entities and back again
Why Use This Tool
Fast
See results as you type. No waiting, no loading spinners.
Private
Everything happens in your browser. We never see your data.
Works Offline
Install it as an app and use it without internet.
Multiple Formats
Choose between named, decimal, or hexadecimal entities.
File Support
Upload and download .txt, .html, and .xml files.
Free
No signup, no payment, no limits. Just use it.
How to Use
- Paste your HTML in the input box
- Pick a format (Named, Decimal, or Hex)
- Copy the result or download it as a file
Need to decode instead? Use the HTML Decoder.
When You Need HTML Encoding
Showing Code Examples
When you want to display HTML code on a webpage without it being executed.
User Input
Before displaying text from users to prevent XSS attacks.
Email Templates
To ensure special characters display correctly across different email clients.
Data Export
When saving HTML to databases or XML files.
Common Questions
What is HTML entity encoding?
It converts special characters like &, <, and > into their entity equivalents (&, <, >). This lets you show these characters on a webpage without the browser treating them as HTML code.
What's the difference between the formats?
Named entities use readable names (&), decimal uses numbers (&), and hex uses hexadecimal (&). They all do the same thing, just written differently. Named is usually easiest to read.
Is my data safe?
Yes. All encoding happens in your browser using JavaScript. Your text never gets sent to any server. You can even use it offline after installing it as an app.
Can I process large files?
Yes. The tool uses web workers to handle large files without freezing your browser. You can upload and download files up to several megabytes.