HTML Entity Encoder / Decoder

Escape special characters so text is safe to place inside HTML, or decode HTML entities back into readable text. You can optionally encode every non-ASCII character as a numeric entity.

Runs in your browser — your files never leave your device

Encoding and decoding HTML entities

Certain characters have special meaning in HTML: <, >, &, and quotes. To display them as text rather than markup, they must be encoded as entities (&lt;, &gt;, &amp;). This prevents broken pages and cross-site scripting.

Encoding escapes those characters (and optionally all non-ASCII as numeric entities); decoding turns entities back into readable characters using the browser's own parser, safely and without executing anything. It all runs locally.

How to use HTML Entity Encoder / Decoder

  1. 1Choose Encode or Decode.
  2. 2Paste your text or HTML.
  3. 3For encoding, optionally escape all non-ASCII characters.
  4. 4Copy the result.

Frequently asked questions

Which characters get encoded?

The five HTML-significant characters (& < > " ') are always encoded; you can also escape every non-ASCII character.

Is decoding safe?

Yes. Entities are resolved with the browser's parser and no HTML is executed; nothing is sent to a server.

Why encode HTML entities?

It prevents characters like < and & from being interpreted as markup, avoiding broken pages and injection issues.