How to use the HTML Entity Encoder
- Choose Encode or Decode.
- Paste your text or HTML. The result updates instantly.
- Choose the entity format and whether to encode non-ASCII characters, then copy the output.
About this tool
Characters like <, >, & and quotes have special meaning in HTML. To show them as text – for example when publishing a code sample – they must be written as entities such as < and & – exactly what this HTML entity encoder does. Getting this wrong breaks layouts and, with user-supplied content, can open the door to cross-site scripting.
This tool encodes text to entities (only the essential characters, or every non-ASCII character too) in named, decimal or hexadecimal form, and decodes any named or numeric entities back to readable text. Conversion happens live as you type.