HTML Entity Encoder / Decoder
Escape and unescape HTML entities like &, < and >.
Convert reserved HTML characters to their entity form so they display as text instead of markup, and decode entities (named, decimal é or hex é) back to characters. Optionally encode every non-ASCII character as a numeric entity. All processing stays in your browser.
—
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.