# HTML Entity Encoder/Decoder

> Encode special characters to HTML entities (& < > " ’) and decode named, decimal, or hex entities back to text.

URL: https://uttir.com/html-entity-encoder-decoder
Categories: encoding-tools, developer-tools, text-tools
Privacy: All conversion happens locally in your browser. No text leaves your device.

## About

HTML reserves a handful of characters that have special meaning in markup: &, <, >, ", and '. When you want those characters to appear as text inside an HTML document, you replace them with entities like &amp;, &lt;, and &quot;.

This tool encodes plain text to entities (escaping only the reserved characters by default, or every non-ASCII character in "all" mode) and decodes any combination of named (&copy;), decimal (&#169;), and hex (&#xA9;) entities back to the characters they represent.

## How to use

1. **Encode or decode** — Switch the mode with the toggle at the top of the page.
2. **Paste your text** — Type or paste into the input box. Output updates as you type.
3. **Copy the result** — Use the Copy button to put the converted text on your clipboard.

## Examples

### Encode a tag

Convert <div> to its escaped form.

Output:

```
&lt;div&gt;
```

### Decode a named entity

&copy; 2024 — Uttir → © 2024 — Uttir

Output:

```
© 2024 — Uttir
```

## FAQ

### What is the difference between basic and full encoding?

Basic encoding escapes only the five reserved characters (& < > " '). Full encoding also turns every non-ASCII character into a numeric entity, which can help avoid encoding issues when serving the same HTML across many systems.

### Does the decoder handle decimal and hex entities?

Yes. Both &#169; (decimal) and &#xA9; (hex) are recognized, along with any named entity from the standard set. Unknown entities are left as-is.

### What is the difference between named and numeric entities?

Named entities use a short name (&amp; for &, &lt; for <, &gt; for >). Numeric entities use the Unicode code point (&#38; for &, &#60; for <, &#62; for >). Both render identically; named is more readable, numeric is more universal.

## Related tools

- [Base64 Encoder](https://uttir.com/base64-encoder) — Encode any text — including emoji and non-Latin scripts — into standard Base64.
- [URL Encoder](https://uttir.com/url-encoder) — Percent-encode text for safe use in URLs — as a query value or a full URL.
- [JSON Formatter](https://uttir.com/json-formatter) — Format, beautify, and validate JSON with adjustable indentation — instantly in your browser.

---

For the full HTML page with the live tool, visit https://uttir.com/html-entity-encoder-decoder.
This file is the markdown rendering at https://uttir.com/html-entity-encoder-decoder.md. See https://uttir.com/llms.txt for a site-wide summary.
