HTML Entity Encoder / Decoder

Convert special characters to HTML entities and decode them back — instantly in your browser.

Encode / Decode HTML Entities

Paste your text or HTML below. Choose Encode to convert special characters into HTML entities, or Decode to convert entities back to readable text.

Encoding Format
Input Text / HTML

Common HTML Entities Reference

Click any row to load that character into the encoder.

Char Named Entity Decimal Hex Description

What are HTML Entities?

HTML entities are special codes used to represent characters that have a reserved meaning in HTML, or characters that cannot easily be typed on a keyboard. For example, the less-than sign < must be written as &lt; in HTML source code — otherwise the browser would interpret it as the start of an HTML tag. Entities can be written in three formats: named (&amp;), decimal numeric (&#38;), and hexadecimal numeric (&#x26;).

How to Use the HTML Entity Encoder / Decoder

  1. Choose Encode mode to convert text or HTML into entity-safe format, or Decode mode to convert entities back to plain text.
  2. Select your preferred encoding format: Named Entities, Decimal, or Hexadecimal.
  3. Optionally enable Encode all characters to convert every character to its entity, or Encode quotes for use inside HTML attributes.
  4. Paste your input and click Encode or Decode.
  5. View the output, check the Browser Render Preview to see how the browser interprets it, and copy or download the result.
  6. Use the Reference Table to look up any common entity and click a row to load it directly.

When to Encode HTML Entities

Named vs Numeric Entities

Named entities like &amp; or &copy; are easier to read and remember, but only exist for a limited set of characters defined in the HTML specification. Numeric entities — both decimal (&#169;) and hexadecimal (&#xA9;) — work for every Unicode character, making them more universal. All three formats are equally valid in modern HTML5 and are decoded identically by all browsers.