How to Use HTML Entity Encoder
- Enter your plain text (containing special characters) in the left box.
- The right box will automatically show the converted HTML entity codes.
- Alternatively, enter entity codes in the right box to decode them back to text on the left.
- Click the "Copy" button to instantly get the result.
When writing web pages (HTML), certain characters have special meanings. For example, the less-than sign
< is used to define the start of a tag, and the greater-than sign >
defines the end.
If you want to display these characters themselves on a webpage instead of having the browser interpret
them as code, you must use HTML Entities.
Furthermore, entity encoding is a key method for preventing XSS (Cross-Site Scripting) attacks. By converting user-inputted special characters into entities, malicious scripts are prevented from executing in the browser.
Common HTML Entities Reference
| Character | Description | Entity Name | Entity Number |
|---|---|---|---|
| Non-breaking space | |   | |
| < | Less than | < | < |
| > | Greater than | > | > |
| & | Ampersand | & | & |
| " | Double quote | " | " |
| ' | Single quote | ' | ' |
| © | Copyright | © | © |
| ® | Registered trademark | ® | ® |
Frequently Asked Questions (FAQ)
What is an HTML Entity?
Why use HTML Entities?
What does mean?
Difference between Entity Name and Number?
Do all Unicode characters have entity names?
Can I use HTML entities in CSS or JS?
Does this tool support Emoji?
Do single quotes need to be escaped?
More Free Tools
URL Encoder/Decoder
Encode or decode URLs to fix broken parameters and special characters.
JSON Formatter
Beautify, minify, and validate JSON data online. A developer must-have.
Diff Checker
Compare text files or code to find differences. Highlight changes instantly.
Base64 Converter
Convert text or files to Base64 and vice versa instantly.
HTML <-> Markdown
Convert HTML to Markdown and vice versa. Clean and fast.
URL Slug Generator
Generate SEO-friendly URL slugs from text titles.