HTML entity encoder and decoder

Encode and decode HTML entities. Convert special characters to named, decimal, or hexadecimal entities and back.

Encoding options

Format
Range

Plain text

Encoded text

What this tool does

  • Encodes plain text as named, decimal, or hexadecimal HTML entities.
  • Decodes entity-encoded snippets back into readable text.

When to use it

  • Escape special characters before pasting HTML into docs, templates, or demos.
  • Inspect copied markup that contains &, <, or <.
  • Compare named, decimal, and hexadecimal entities for compatibility needs.

Notes on entity formats

  • Named entities are easiest to read, but not every character has one.
  • Decimal and hexadecimal entities can represent any Unicode character, including emoji.
  • Unknown or invalid entities are left unchanged when decoding.

How to use

Edit either the plain-text or encoded field to convert automatically in both directions. Choose named, decimal, or hexadecimal entities and the character range used for encoding; copy or clear beside either field, or reset the example. The same conversion is available through the HTTP API below.