256 Tools

HTML Entity Encoder / Decoder

Result

Related external sites

Some links are affiliate links.

Related tools

Convert text to HTML entities and back. Escape the characters that have special meaning in HTML — like <, >, & and quotes — so they display as text, and optionally encode non-ASCII characters too. You can also decode named and numeric entities back to plain text. Everything runs in your browser.

How to use

  1. Choose a direction: Encode or Decode.
  2. When encoding, optionally also encode non-ASCII characters.
  3. Paste your text and copy the result.

How it works

Encoding replaces the five characters that matter in HTML — & < > " ' — with their entity equivalents like &amp; and &lt;, so a browser shows them literally instead of treating them as markup. With the non-ASCII option, characters above the basic range become numeric references like &#233;. Decoding reverses this, turning named entities (&copy;) and numeric ones (&#x2615;) back into characters.

The less-than sign converts to and from the entity &lt;.<&lt;

Features

Escape HTML characters

Encode & < > and both quote types so text is safe to place in HTML.

Non-ASCII option

Optionally turn accented and symbol characters into numeric references.

Decode entities

Convert named and numeric entities back to readable characters.

Two-way

Switch between encoding and decoding with one toggle.

When to use it

Show code in HTML

Display tags and snippets on a page without them rendering.

Insert symbols

Add special characters safely with numeric references.

Email & templates

Escape user content before inserting it into HTML templates.

Read encoded text

Decode entity-laden text from logs or exports back to plain text.

Notes

  • Decoding supports common named entities plus all numeric references.
  • The apostrophe is encoded as &#39; for safe use in attributes.
  • Escaping helps prevent markup from breaking or injecting into a page.
  • Everything runs on your device; nothing is uploaded.

FAQ

What is &lt;?
It is the HTML entity for the less-than sign (<). Writing &lt; lets a browser show the character instead of starting a tag.
What are numeric references?
They encode a character by its code point, in decimal (&#233;) or hex (&#xe9;). They can represent any character.
Why escape HTML?
So special characters display correctly and untrusted text cannot inject markup or scripts into a page.
Which entities can it decode?
Common named entities like &amp;, &copy; and &mdash;, plus all decimal and hex numeric references.
Is my text sent to a server?
No. Encoding and decoding happen entirely in your browser.

We use cookies for ads and analytics.