HTML Encoder/Decoder
Online HTML Entity Encoding and Decoding Tool, featuring smart automatic detection, three encoding formats, file upload and download, and a reference table of over 200 HTML entities
Input Text
Output Result
👁️ Visual Preview — How encoded output renders in browser
Collapse ▲After encoding input text, the actual rendering will appear here
📚 HTML Entity Reference (Click to Expand)
▼What is HTML entity encoding/decoding?
HTML Entity is a text string that begins with & and ends with ;, used to display reserved characters in HTML documents (such as <, >), or to represent characters that are difficult to type on a keyboard (such as ©, €).
Encode: Replaces special characters in HTML with their corresponding HTML entities, preventing the browser from parsing them as HTML tags.
Decode: Converts HTML entities back to their original characters, making it easier to view and edit the actual content.
6 Characters That Must Be Escaped
| Character | Named Entity | Decimal Entity | Hex Entity | Description |
|---|---|---|---|---|
| & | & | & | & | Ampersand |
| < | < | < | < | Less than |
| > | > | > | > | Greater than |
| " | " | " | " | Double quote |
| ' | ' | ' | ' | Single quote |
Common Use Cases
- XSS Prevention — Encode
<>in user input to safely embed into HTML pages - Display Code on Web Pages — Show HTML code snippets without the browser rendering them as actual elements
- Secure Data Transmission — Encode text containing special characters before storage or transmission
- Template Development — Encode dynamic HTML content when embedding it in templates



