Skip to content
hateitall

HTML Entity Encoder and Decoder

Make text safe to drop into HTML, or turn é and ' soup from a feed or database back into readable characters.

Processed locallyIn: Text, HTMLOut: Escaped HTML, Text

Loading tool…

How to use html entity encoder and decoder

  1. Choose Encode or Decode.

  2. Paste the text or the entity-filled HTML.

  3. When encoding, pick markup only, names where possible, or numbers for all non-ASCII.

  4. Copy the result or download it.

What this tool does

  • Escapes & < > " and ' for safe use in elements and quoted attributes.
  • Can also turn non-ASCII into names (&eacute;) or hex and decimal references.
  • Decodes every named entity browsers know, plus decimal and hex references, emoji included.
  • Lists entities it cannot decode instead of silently changing them.

How the result is verified

Encoded output is decoded again and compared with your input exactly. When decoding, entities that do not exist are listed rather than guessed.

Frequently asked questions

Which characters must be escaped in HTML?

In normal text only & and < have to be. Inside an attribute, escape the quote that wraps it. Escaping & < > " and ' everywhere, as the Markup only option does, is the simple safe habit.

Should I use named or numeric entities?

With a UTF-8 page you rarely need either for accents or emoji. Numeric references work everywhere, including XML; names are easier to read but only a fixed set exists.

Is my data uploaded to a server?

No. Everything you drop, paste or type is processed by code running in this browser tab. You can check it yourself: open your browser's developer tools, watch the Network panel, and use the tool. No request carries your data.

Percent-encode text for query strings, full URLs or form data

Text · URL→ Percent-encoded textLight on device

Text to \u escapes, U+ code points and HTML references, and back

Text · Escaped text→ Escaped textLight on device

Text or files to Base64, Base64url or a data URL, with UTF-8 support

Text · Any file→ Base64Light on device