HTML Entity Encoder

Encode or decode HTML entities safely.

Encoding Mode
Scope
Options
Input
Output
Decode Options
Input
Output
Char Named Decimal Hex Description

How to use

  1. Paste your text or HTML snippet into the input area.
  2. Pick Encode to turn special characters into HTML entities, or Decode to do the reverse.
  3. Choose between named entities (&) and numeric ones (&).
  4. The output appears live and can be copied with a single click.
  5. 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 &#128512; 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