HTML entity encode / decode
Entity conversion at the character level: decode turns `<`, `&` and `😀` back into characters (named entities plus decimal and hex, unknown ones kept verbatim), encode turns `& < >` and optionally quotes into entities. Tag structure is untouched and no double escaping such as `&lt;` appears.
Runs in your browserEvery computation happens in your browser — your data never leaves this device.
Result
The result can be copied directly.
Enter text to see the encoded or decoded result
Characters: 0 · Lines: 0 · Entities left: 0
What this tool does
- Turn captured entity text back into readable characters.
- Escape user input safely into HTML attributes or body text.
- Check how many entities in a text were not recognised.
Example
Input
a < b & c
Output
a < b & c
Decoding supports named, decimal and hex entities; encoding covers `& < >` and optionally quotes.
Frequently asked questions
Can it double-escape?
No. A decoded `&` is not re-encoded in the next pass, and encoding never wraps an existing entity again.
Which entities are supported?
The common HTML4 named set plus decimal `&` and hex `&`; encoding covers `& < >` and optionally quotes, which is the usual injection surface.
When should quotes be escaped?
When you place text inside an attribute value such as a link target; quotes in body text normally do not need it.
What is the changed field?
The absolute difference between input and output length; 0 means this call changed nothing.
Keywords:html2strentity decodeescape htmldeveloper