HTML Entity Encoder / Decoder

Escape text into HTML entities (and back) — named, decimal, or hex, including emoji and other Unicode. Runs entirely in your browser.

Advertisement
What are HTML entities?

The &…; codes that let you put reserved or non-ASCII characters in HTML.

Some characters can't appear literally in HTML: <, >, and & are markup, and " / ' matter inside attributes. HTML entities encode them — &lt; for <, &amp; for & — so the browser shows the character instead of interpreting it. Any character can also be written numerically: &#233; or &#xE9; for é, &#128512; for 😀.

Encode escapes the reserved characters (and, optionally, every non-ASCII character to a numeric entity — decimal or hex). Decode turns any mix of named, decimal, and hex entities back into text. Encoding happens with simple replace tables; decoding uses the browser's own parser, so it understands the full named-entity set. Nothing is sent to a server.

Read more on Wikipedia
Copied to clipboard