Encode or decode HTML entities. Can encode and decode named references (e.g. &) or hexadecimal escapes (e.g. &) and has an option to convert only unsafe symbols or all symbols.
Full list of named character references on w3.org