# Encode or decode HTML entities

> Convert text to HTML entities (so it's safe inside HTML) or decode HTML entities back to readable characters.

Open the tool: https://yourbrowsercandoit.com/html-entity

Encode or decode HTML entities. Free, no signup. Runs entirely in your browser; files are never uploaded.

## How it works

Encode mode replaces special characters with their HTML entity equivalents: < becomes &lt;, > becomes &gt;, & becomes &amp;, etc. Common named entities are used where they exist (&copy;, &reg;, &trade;, &euro;, &ndash;, &hellip;, &nbsp;), and other non-ASCII characters fall back to numeric entities (&#1234;). Decode mode uses the browser's own HTML parser (via a textarea element) to convert any entity, named or numeric, back to its character. Live as you type. Useful for safely embedding user input in HTML, sanitizing copy-pasted text from rich editors, or decoding entity-soup from email or legacy CMSes.

## How to use it

1. **Pick encode or decode.** Encode makes text safe inside HTML; decode turns entities back into characters.
2. **Paste your text.** The conversion runs live — named entities where they exist, numeric fallbacks otherwise.
3. **Copy the output.** Everything happens in your browser, nothing is sent anywhere.

## Frequently asked questions

### Why use HTML entities?

To safely include characters that would otherwise be interpreted as HTML markup. < and > inside text become &lt; and &gt; so the browser shows them rather than treating them as tags.

### Does it handle Unicode emoji?

Encode mode converts to numeric entities (&#128512;). Decode mode handles any entity the browser recognizes.

### Is my text uploaded?

No. Encoding and decoding both happen in your browser.

### Are all named entities supported?

Encode mode uses a curated set of common named entities; everything else falls back to numeric. Decode mode handles all browser-recognized entities.

## Related tools

- [JSON to CSV](https://yourbrowsercandoit.com/json-to-csv): Turn JSON into a CSV table, nested fields and all.
- [CSV to JSON](https://yourbrowsercandoit.com/csv-to-json): Convert CSV to a JSON array, with live preview.
- [Password generator](https://yourbrowsercandoit.com/password-generator): Generate strong random passwords with crypto entropy.
- [Password strength](https://yourbrowsercandoit.com/password-checker): Check password strength with zxcvbn-style heuristics.
- [JSON formatter](https://yourbrowsercandoit.com/json-formatter): Format, validate and fix JSON, with a tree view.
- [Regex tester](https://yourbrowsercandoit.com/regex-tester): Test regular expressions with live highlighting.
