HTML Entity Encoder

By the ToolPocket team · Updated 2026-12-05 · Editorial standards

HTML entities let you display characters that would otherwise be treated as markup, such as angle brackets or ampersands. They also let you write characters that are hard to type directly.

Encode text for a template or decode a snippet you copied from a page. Everything runs locally in your browser.

Runs locally in your browser — nothing is uploaded.

How to use the HTML Entity Encoder

  1. Choose Encode or Decode.
  2. Paste the text.
  3. Copy the result.

Frequently asked questions

Which entities are encoded?

The five characters that can break HTML — & < > " ' — become named entities. Other characters can be encoded as numeric entities if you enable that option.

Is decoding safe?

Decoding maps entities to characters. It does not execute scripts; the result is shown as text.

Why do I need this?

When inserting user text into HTML, escaping prevents broken markup and cross-site scripting. When reading a page's source, decoding makes it readable again.

Good to know

Escaping is a security control as much as a formatting one: inserting unescaped user text into HTML is the classic cross-site scripting path. Encoding the five structural characters closes the common case.

Decoding is the reverse direction and is mostly useful when reading page source or migrating content between CMS platforms that store entities differently.