Skip to content
PrivBay

HTML entity decoder and encoder

Convert HTML5 character references to text or escape text with named, decimal or hexadecimal entities.

Mode

Decoding and encoding both return plain text.

Ready. Your files stay on this device.

Result

—

How to decode or encode HTML entities

  1. Choose Decode or Encode in Mode.
  2. Paste text into Input. For encoding, choose an Entity format and whether to Encode non-ASCII characters.
  3. Select Decode or Encode, then use Copy result.

Decode HTML5 character references or escape special characters

Paste a snippet from a CMS export, RSS feed or HTML template into the HTML entity decoder. Named HTML entities and numeric references represent reserved or non-ASCII characters in markup, and HTML5 character references also include names that expand to multiple Unicode code points. Switch to the HTML entity encoder when you need to escape special characters so angle brackets, quotes or ampersands display literally inside <code> blocks or attributes. Decimal entities and hexadecimal entities encode the same Unicode code point in base 10 or base 16.

Character Named entity Decimal entity Hexadecimal entity Purpose in HTML
& &amp; &#38; &#x26; Starts an entity reference or query parameter
< &lt; &#60; &#x3C; Opens an HTML tag
> &gt; &#62; &#x3E; Closes an HTML tag
" &quot; &#34; &#x22; Delimits double-quoted attribute values
' &apos; &#39; &#x27; Delimits single-quoted attribute values
Non-breaking space &nbsp; &#160; &#xA0; Prevents an automatic line wrap between words

Choose named, decimal or hexadecimal entities

Use named references when people will read or edit the markup by hand. Choose decimal entities or hexadecimal entities when generating XML-compatible output or escaping emoji and symbols across systems that only recognize numeric references. Enabling non-ASCII encoding converts accented letters, typographic punctuation and emoji into ASCII-safe references while leaving ordinary Latin text untouched.

Identify the encoding from its markers

Ampersands followed by a name or # number indicate HTML entities. Percent escapes such as %20 belong to URLs; open the URL decoder for query strings or the Base64 decoder for Base64 payloads. For documentation written in Markdown, the Markdown to PDF tool previews headings, code blocks and tables before printing.

To generate a JSON-LD script for your page, use Schema Markup Generator.

Frequently asked questions

Can I decode emoji?

Yes. For example, &#x1F600; decodes to a grinning face.

What happens to an unknown entity?

The tool preserves an unrecognized named entity as it appears in the input.

Will decoded HTML run in the browser?

The result is displayed as plain text, so decoded angle brackets and tag names remain visible as characters.

What gets encoded by default?

Encoding escapes ampersands, angle brackets, quotes and backticks. Select Encode non-ASCII characters to include accented letters, symbols and emoji.

What if a character has no entity name?

Named mode falls back to a numeric reference when the character has no HTML5 name.

Last updated November 12, 2026