HTML Entity Encoder / Decoder
Escape and unescape HTML entities like &, < and >.
Output
—
Formula & methodology
Encoding replaces &, <, >, " and ' with their named entities; the optional mode also turns characters above U+007F into &#NNN;. Decoding resolves named, decimal and hexadecimal references.
Worked example
- <b>Tom & "Jo"</b> → <b>Tom & "Jo"</b>
- é © → é ©
Frequently asked questions
Why escape HTML?
Escaping prevents characters like < and & from being interpreted as tags or entities, which also helps avoid broken markup and injection when showing user text.
Does it decode hex entities?
Yes. It resolves named entities, decimal references like é and hex references like é.
Privacy
All processing happens locally in your browser. Your data is never uploaded.