HTML entity encoder and decoder
Escape special characters for HTML, or turn entities like & back into text.
Which characters need escaping?
In HTML text, escape & as & and < as <. Inside attribute values, also escape quotes: " as " and ' as '. Escaping user input this way is a key defence against cross-site scripting (XSS).
Tick Encode all non-ASCII to also turn characters like é and emoji into numeric entities, for systems that can't handle UTF-8.
Private
Everything runs in your browser. Nothing you paste is uploaded, logged or stored on a server, so it's safe to use with private data.
Questions
What is &nbsp;?
A non-breaking space: a space that stops two words being split across lines.
Should I escape > too?
It's not strictly required in text, but escaping it as > is harmless and common.