HTML named entities let you show characters that would otherwise be interpreted
as markup. This tool escapes the critical characters and a useful table of
common symbols into their &name; form, and decodes them back to plain text.
How it works
Encoding replaces the ampersand first, then the remaining special characters, so no escape sequence is ever double-processed:
& -> &
< -> <
> -> >
" -> "
' -> '
© -> © (non-breaking space) ->
Decoding scans for &...; references, looks each named entity up in the table,
and also expands numeric references such as   and   so mixed input
is handled cleanly.
Tips and notes
Always encode the ampersand before any other character — this is the single most
common bug in hand-rolled escapers. When putting user text inside an HTML
attribute, the double quote must be escaped ("), which this tool does. For
content that will be parsed as XML rather than HTML, prefer the dedicated XML
escaper, since HTML defines hundreds of named entities that XML does not.