What Does the HTML Entity Encoder / Decoder Do?
This tool converts characters that have special meaning in HTML โ <, >, &, quotes โ into their safe entity forms (<, >, &, "), and decodes any entity-laden text back to plain characters. An optional mode also converts every non-ASCII character (accents, symbols, emoji) into numeric entities like é, useful when your pipeline can't be trusted with UTF-8.
Decoding understands the full set of named entities (é, —, โฆ) as well as decimal and hexadecimal numeric forms, because it uses the browser's own HTML parser.
How to Use the Tool
- Choose Encode or Decode.
- Paste your text or markup โ conversion is instant.
- For encoding, optionally tick "Also encode non-ASCII characters".
- Copy the result.
Why Entity Encoding Matters
- Displaying code on a web page โ to show
<div>as text instead of rendering it, it must be written as<div>. - Preventing XSS โ encoding user input before inserting it into HTML is the fundamental defense against script injection.
- Valid markup โ a raw
&in an HTML attribute or XML feed is technically invalid and can break strict parsers. - Recovering readable text โ decode scraped content or database exports full of
’-style artifacts back to normal punctuation.