Encode special characters to HTML entities or decode entities back to characters.
| Character | Entity | Name |
|---|---|---|
| < | < | Less than |
| > | > | Greater than |
| & | & | Ampersand |
| " | " | Double quote |
| ' | ' | Single quote |
| | Non-breaking space |
Encode special characters into HTML entities or decode them back. Prevents code injection and ensures special characters like angle brackets and ampersands display correctly on web pages.
Characters like <, >, and & have special meaning in HTML. Encoding them as < > and & ensures they display as text instead of being interpreted as code.
The ampersand (&) is encoded as & in HTML. This prevents the browser from interpreting it as the start of another entity.