HTML entities are escape sequences that let you include reserved characters — like the ampersand or angle brackets — or any Unicode character inside HTML without the browser misinterpreting it. This tool decodes named, decimal, and hexadecimal entities back to plain text, and can also encode text into safe entities.
How it works
Every entity starts with an ampersand and ends with a semicolon. There are three forms:
& named entity -> &
A decimal reference -> A
A hexadecimal reference -> A
To decode, the tool scans for these patterns. A named entity is looked up in a table of common names (such as amp, lt, copy, mdash, pound) to find its Unicode code point. A numeric reference is parsed as decimal, or as hexadecimal when it begins with #x, then converted with String.fromCodePoint. Anything that is not a recognised name or a valid code point is left exactly as written, so content is never silently corrupted.
Encoding direction
Encoding is the reverse: the HTML-significant characters &, <, >, ", and ' are replaced with their safe entity equivalents (&, <, >, ", '). An optional setting also converts every non-ASCII character to a numeric reference, which is useful when a system can only transmit plain ASCII.
Example
The fragment Fish & Chips — £5 ☺ decodes to Fish & Chips — £5 ☺. Here & is the named ampersand, — is the decimal code for an em dash, £ is the named pound sign, and ☺ is the hex code for a smiling face. All processing happens in your browser.