HTML Entity Encoder / Decoder

Encode & decode HTML entities

Escape special characters like <, >, & and quotes into HTML entities, or decode entities back to readable text — instantly, in your browser.

Result
The converted text will appear here.

About the html entity encoder / decoder

HTML entities let you display characters that have special meaning in HTML — such as <, >, & and quotes — without the browser treating them as markup. Encoding is essential when inserting untrusted text into a web page to prevent cross-site scripting (XSS).

This tool escapes the five core XML/HTML characters ( & < > " ') and optionally encodes every non-ASCII character as a numeric entity. Decoding handles named entities (like &copy; and &mdash;) plus decimal and hexadecimal numeric entities (&#8212;, &#x2014;).

Options

  • Encode quotes — also escape " and ' (recommended for attribute values).
  • Encode all non-ASCII — render every character above U+007F as a numeric entity.

How to use the html entity encoder / decoder

  1. Choose a mode

    Switch between Encode (text → entities) and Decode (entities → text).

  2. Paste your text

    Type or paste the text you want to convert into the input box.

  3. Set options (encode only)

    Toggle quote encoding and non-ASCII encoding as needed.

  4. Copy the result

    The converted text appears instantly — click Copy to use it.

Frequently asked questions

Why should I encode HTML entities?
Encoding prevents characters like <, > and & from being interpreted as HTML markup, which is critical for avoiding cross-site scripting (XSS) when displaying user-supplied content.
What is the difference between named and numeric entities?
Named entities use a word (e.g. &amp;copy;), while numeric entities use a code point (e.g. &amp;#169; or &amp;#x00A9;). Both render the same character; this tool decodes both forms.
Should I encode quotes?
Yes, if the text will be placed inside an HTML attribute value. For text inside element bodies, encoding quotes is optional but harmless.
Does decoding handle all named entities?
It handles the most common named entities (copyright, em dash, quotes, currency symbols and more). Obscure entities fall back to their raw form.
Is my text sent to a server?
No. All encoding and decoding happens entirely in your browser.

I want to…

Common reasons people reach for the html entity encoder / decoder — see if it matches your task.

  • Escape HTML special characters into entities
  • Decode HTML entities back to readable text
  • Encode <, >, & and quotes for safe HTML output
  • Convert pasted HTML entities to plain text