Skip to content
AldeaCode Logo
Format100% local · 0 bytes sent

HTML Entities Encoder and Decoder

Convert special characters into safe HTML entities to prevent XSS or rendering issues, and decode them back to readable text. Optional mode encodes every non-ASCII character as a numeric entity, useful for email templates and ASCII-only systems.

Loading…

How it works

Encode: we replace each special character with its named entity (&, <, >, ", ', etc.). Optional all-chars mode encodes every code point above 127 as &#NNN;. Decode: we walk both named entities and numeric forms (&#decimal; and &#xhex;) back to characters via String.fromCodePoint.

How to use it

  1. Paste text or entities

    Drop in raw HTML or a snippet with entities. The tool detects whether you want to encode or decode based on the toggle.

  2. Pick named or all-chars

    Named replaces &<>"' with their named entities. All-chars also encodes every code point above 127 as &#NNN; for ASCII-only systems.

  3. Run the conversion

    Encoding swaps specials for entities. Decoding walks named (&amp;) and numeric (&#decimal; or &#xhex;) forms back to characters.

  4. Copy the safe output

    Take the entities into an HTML page, an email template that strips Unicode, an RSS feed, or anywhere XSS-safe escaping matters.

Use cases

Escape user input before injecting it into a static HTML page.

Decode an HTML snippet copied from a CMS.

Embed an emoji in an email template that strips Unicode.

Read what a &amp;#x2014; really means.

Sanitise content for an RSS feed.

Your data never leaves your browser

Every utility runs entirely on your device. Nothing is uploaded, nothing is stored on a server. You can disconnect from the internet and they keep working.

Frequently asked questions

Related tools