HTML Entity Encoder
Encode or decode HTML entities safely.
Input
Output
Input
Output
| Char | Named | Decimal | Hex | Description |
|---|
How to use
- Paste your text or HTML snippet into the input area.
- Pick Encode to turn special characters into HTML entities, or Decode to do the reverse.
- Choose between named entities (
&) and numeric ones (&). - The output appears live and can be copied with a single click.
- Use the Swap button to push the output back as the new input.
Frequently asked questions
When should I use named versus numeric entities?
Named entities like © are easier to read; numeric like © work universally even in legacy XML where only a small set of names exist. Numeric is the safest choice for non-HTML contexts.
Which characters absolutely need encoding?
Inside HTML you must escape &, <, >, and inside attributes also " and '. Failing to escape these is a common source of XSS vulnerabilities.
Will the encoder handle emoji and astral characters?
Yes. Characters outside the Basic Multilingual Plane are encoded as their full unicode code point, for example 😀 for the grinning face emoji.
Is my input uploaded anywhere?
No. Encoding and decoding happen locally in JavaScript, so secrets in your HTML stay on your device.
Advertisement