๐Ÿ”’ Runs in your browser โ€” nothing is uploadedโœ“ Free, no signup

HTML Entity Encoder & Decoder

Encode characters like &, <, > and quotes as HTML entities so they display as text โ€” or decode named and numeric entities such as &copy; and &#x1F600; back to characters.

0 characters

Encoded text

When should you use the HTML Entity Encoder / Decoder?

  • Showing code or HTML tags as text on a web page
  • Reading text full of &amp; and &#39; from an API or database
  • Making special characters safe for HTML attributes and email templates

How to use the HTML Entity Encoder / Decoder

  1. 1

    Choose Encode or Decode

    Encode turns characters into entities. Decode turns entities back into characters.

  2. 2

    Paste text

    The result appears as you type.

  3. 3

    Handle non-ASCII (optional)

    When encoding, choose whether characters like รฉ and ๐Ÿ˜€ stay as they are or become numeric entities.

  4. 4

    Copy

    Copy the result into your HTML or code.

Examples

Encoding HTML so it shows as text

Text

<p>Tom & Jerry's "show"</p>

Encoded

&lt;p&gt;Tom &amp; Jerry&#39;s &quot;show&quot;&lt;/p&gt;

Common errors and how to fix them

The page shows &amp; instead of &
The text was encoded twice (& became &amp;amp;). Decode it once and the browser will show &.
Some entity wasn't decoded
Check it ends with a semicolon, e.g. &copy; not &copy โ€” and names are case-sensitive.
Related tools:ย String Escape / Unescape ยท URL Encoder & Decoder ยท HTML Formatter

More from Encoding & Security

Free tools that run in your browser โ€” no signup, nothing uploaded.

HTML Entity Encoder / Decoder FAQ

Codes that represent characters in HTML, like &lt; for < and &amp; for &. They let you show characters that would otherwise be read as HTML markup.

& and < always in text, and " or ' inside attribute values. > is usually encoded too for safety. Everything else can stay as normal UTF-8 characters.

Yes. Decoding uses the browser's own HTML parser, so all named entities (like &eacute;, &mdash;, &nbsp;) and numeric ones (&#233;, &#xE9;) are supported.

Both are รฉ. &#233; uses the decimal code point and &#xE9; uses hexadecimal. Browsers understand both.

Encoding text before inserting it into HTML is a key part of preventing cross-site scripting, but use your framework's built-in escaping in real applications.

No. Encoding and decoding happen in your browser, without running any of the HTML.