HTML Encoder/Decoder
Encode special characters to HTML entities or decode them back
& < > " 'How to Use
- 1Select encode or decode mode
- 2Paste your text or HTML in the input panel
- 3See the encoded/decoded result instantly
- 4Copy the result for use in your project
HTML Entities Reference
| Character | Entity | Description |
|---|---|---|
| & | & | Ampersand |
| < | < | Less than |
| > | > | Greater than |
| " | " | Double quote |
| ' | ' | Single quote (apostrophe) |
Why Encode HTML?
HTML encoding is essential for displaying special characters correctly in web pages and for preventing Cross-Site Scripting (XSS) attacks. When user input is displayed on a web page, it must be encoded to prevent malicious scripts from executing.
For example, if a user enters <script> in a form field and it is displayed without encoding, it could execute as JavaScript. Encoding converts it to <script>, which displays as text instead of executing.
FAQ
Is my data safe?
Yes. This tool runs entirely in your browser. Your text is never sent to any server.
What characters are encoded?
This tool encodes the most important characters for HTML safety: ampersand (&), less than (<), greater than (>), double quote ("), single quote ('), forward slash (/), backtick (`), and equals (=).
Does this handle all HTML entities?
The decoder handles named entities (like &) and numeric entities (like & and &). The encoder focuses on security-critical characters.