Free online HTML entity encoder and decoder
Escape or unescape HTML instantly. In Encode mode this tool replaces the five
characters that matter most in markup — &, <,
>, ", and ' — with safe
entities so text displays literally instead of being parsed as tags. In Decode
mode it turns entities such as & or ©
back into their original characters. It is ideal for pasting code samples into
a page, sanitising user-generated content, cleaning up scraped HTML, and
debugging API responses. Everything happens live in your browser as you type.
How to encode or decode HTML entities
- Choose Encode to escape text, or Decode to unescape entities.
- Type or paste your content into the input box on the left.
- Read the converted result in the output box — it updates automatically.
- When encoding, tick Encode all non-ASCII to numeric entities to force pure-ASCII output.
- Use Swap for a quick round trip, then Copy output or Clear.
Named vs numeric entities
A named entity spells the character out, like < for a
less-than sign, while a numeric entity uses the character’s code point,
like <. This encoder writes the reserved characters as the
well-supported names &, <,
>, and ", and uses the numeric
' for the apostrophe for maximum compatibility. If you are
preparing data for a URL query string instead of page markup, reach for the
URL encoder / decoder, or convert binary-safe
payloads with the Base64 encoder.
Safe decoding in your browser
Decoding uses the browser’s own HTML parser: the input is assigned to a detached element and read back as plain text, which resolves named and numeric entities without executing any scripts or fetching anything. Because the whole tool runs client-side, nothing you paste ever leaves your device, so it is safe to work with private or sensitive content.