# HTML Entities

> Escape < > & and quotes, or decode entities. Runs entirely in your browser — nothing you paste is sent anywhere.

Source: https://toffeekit.com/tools/html-entity-encoder

**Category:** [Developer](https://toffeekit.com/category/developer) · **Price:** Free · **Runs:** in your browser, nothing is uploaded

Open the tool: https://toffeekit.com/tools/html-entity-encoder

**Also useful for:** html, entities, escape, unescape

## How it works

1. Paste your HTML or text into the Input box.
2. Choose Encode to escape characters, or Decode to turn entities back into text.
3. When encoding, tick Encode non-ASCII too if you want accents and symbols as numeric entities.
4. Click Copy or Save, or press Swap to reverse the result.

## FAQ

### How do I escape HTML characters?

Paste the markup with Mode on Encode. The characters & < > " and ' become &amp; &lt; &gt; &quot; and &#39;, so the browser shows them as text instead of reading them as code.

### How do I decode HTML entities like &amp; and &nbsp;?

Switch Mode to Decode and paste the text. Named entities and numeric ones such as &#169; are converted back to the characters they stand for.

### Why do I need to escape HTML?

Showing user-provided text inside a page without escaping lets it be read as markup, which can break the layout or open the door to cross-site scripting. Escaping makes the browser treat it as plain text.

### What does Encode non-ASCII too do?

It also converts every character outside basic ASCII, like é or ©, into a numeric entity such as &#233;. Use it when the file or system cannot be trusted to keep UTF-8.

### Which characters does the encoder escape by default?

Five: the ampersand, less-than, greater-than, double quote and single quote. Other characters, including accents and emoji, are left as they are unless you turn on the non-ASCII option.

### Is HTML Entities free and private?

Yes. It's free with no sign-up or limits, and it runs entirely in your browser, so what you type or paste never leaves your device. It works on phones and computers alike.

## Privacy

HTML Entities runs entirely in your browser. Your files and text are processed on your device and are never uploaded.

## Related tools

- [JSON Formatter](https://toffeekit.com/tools/json-formatter) — Format, minify and validate JSON with clear errors.
- [Base64 Encode / Decode](https://toffeekit.com/tools/base64-encoder) — Encode text to Base64 or decode it back, UTF-8 safe.
- [URL Encode / Decode](https://toffeekit.com/tools/url-encoder) — Percent-encode query values or whole URLs.
- [JWT Decoder](https://toffeekit.com/tools/jwt-decoder) — Read a token's header, claims and expiry.
- [Hash Generator](https://toffeekit.com/tools/hash-generator) — MD5, SHA-1, SHA-256, SHA-384 and SHA-512 at once.
- [UUID Generator](https://toffeekit.com/tools/uuid-generator) — Random v4 or time-sorted v7 UUIDs, in bulk.

