HTML Entity Encoder / Decoder
Turn special characters into safe HTML entities, or decode entities already in a string back to plain text.
About this tool
Encode with "HTML special characters only" to make text safe to place inside HTML: &, <, >, " and ' become entities and everything else is left as typed, which is all a UTF-8 page needs. Choose "all non-ASCII" when the text is going somewhere that can't handle UTF-8, such as some older email systems: accented letters and symbols then become named entities where a well-known name exists (é, £) and numeric ones otherwise, in decimal or hex. Emoji become a single entity such as 😀.
Decode uses your browser's own HTML parser, so it understands every named entity in the HTML standard (over 2,000, from ♥ to ≱) as well as decimal and hex numbers. Tags in the input are left as text and nothing is run. Invalid numbers, such as � or values beyond the last Unicode character, become the replacement character �, just as they would on a web page.