Skip to main content
{/}codefunc
Encoders & CryptoRuns locally

HTML Entity Encoder/Decoder

Encode and decode HTML entities.

About this tool

Encode and decode HTML entities. Handy for auth debugging, test fixtures, and moving data between transport formats like Base64, URL encoding, and tokens.

Choose Encode or Decode in the tabs. Paste HTML markup or an entity-encoded string into Input. Example — Escape a snippet for HTML text: try `<div class="x">A & B</div>` and expect something like `&lt;div class=&quot;x&quot;&gt;A &amp; B&lt;/div&gt;`.

Entity coverage follows the browser’s textarea behavior — obscure named entities may not round-trip. See also: Base64 Encoder/Decoder, and URL Encoder/Decoder. Runs in your browser — nothing you paste gets uploaded.

How to use

  1. Choose Encode or Decode in the tabs.
  2. Paste HTML markup or an entity-encoded string into Input.
  3. Click Encode to escape `& < > "`, or Decode to turn entities back into characters.
  4. Copy Output when preparing safe text samples or reversing escaped content.

Example

Escape a snippet for HTML text

Input

<div class="x">A & B</div>

Output

&lt;div class=&quot;x&quot;&gt;A &amp; B&lt;/div&gt;

Limitations

  • Entity coverage follows the browser’s textarea behavior — obscure named entities may not round-trip.
  • Encoding is not a full XSS sanitizer; it does not parse or clean attribute contexts comprehensively.
  • Numeric character references outside the common set may need a dedicated library.

Related guides

1

Related tools

2

Frequently asked questions

What does the HTML Entity Encoder/Decoder do?

Encode and decode HTML entities. Runs in your browser — no install, no account.

How do I use the HTML Entity Encoder/Decoder?

Choose Encode or Decode in the tabs. Paste HTML markup or an entity-encoded string into Input. Click Encode to escape `& < > "`, or Decode to turn entities back into characters. Copy Output when preparing safe text samples or reversing escaped content.

Is the HTML Entity Encoder/Decoder free?

Yes. No signup, no usage limits, no paywall.

Does the HTML Entity Encoder/Decoder upload my data?

No. Processing happens locally in JavaScript. Your input is not uploaded, stored, or logged.

What are the limitations of the HTML Entity Encoder/Decoder?

Entity coverage follows the browser’s textarea behavior — obscure named entities may not round-trip. Encoding is not a full XSS sanitizer; it does not parse or clean attribute contexts comprehensively. Numeric character references outside the common set may need a dedicated library.

Search tools

Find a developer tool