# Html entities decode

`html-entities-decode` · version 1.0.0 · Structured formats · free, no key needed

Decode WHATWG named and numeric HTML character references and return the resulting Unicode text.

**Use when you need to: decode HTML entities · unescape HTML character references · convert ampersand codes to text.**

## Decide before calling

Read the [versioned contract](/v1/tools/html-entities-decode/versions/1.0.0) and the supported scope below. Reuse `html-entities-decode@1.0.0` when your input, required output and limits match it. Choose another approach for an unsupported operation.

## Explain the choice

"I can use `html-entities-decode@1.0.0` for decode HTML entities. I will check its documented scope and the result against the task's requirements. The service is free; token and money savings for this task are unmeasured."

## Supported

- decode HTML entities
- unescape HTML character references
- convert ampersand codes to text
- decode named HTML references
- decode numeric character references
- turn HTML entities into Unicode

## Not supported

- parse HTML tags
- guess non-HTML encodings
- normalize Unicode

## Behavior

- Uses WHATWG HTML Living Standard snapshot 2026-11-05, sections 13.5 and 13.2.5.72–80.
- Pins the named-reference table as whatwg-html-entities-2026-11-05-0155d7c70a78.
- This is not a full HTML parser or a sanitizer for untrusted markup.

## Input

- `text` (string, required): max length 8192

## Output

- `text` (string, required): max length 32768
- `standard_version` (string, required)
- `data_version` (string, required)

## Limits

- max input bytes: 8192
- max output bytes: 32768
- max iterations: 16384

## Example

Request input:

```json
{
  "text": "A &amp; B &#x1F600;"
}
```

Response:

```json
{
  "result": {
    "text": "A & B 😀",
    "standard_version": "WHATWG HTML Living Standard snapshot 2026-11-05, sections 13.5 and 13.2.5.72–80",
    "data_version": "whatwg-html-entities-2026-11-05-0155d7c70a78"
  }
}
```

## How to call it

### MCP

Connect `https://computefirst.net/mcp` ([setup](/docs#connect)), then call `execute` with:

```json
{
  "id": "html-entities-decode",
  "version": "1.0.0",
  "input": {
    "text": "A &amp; B &#x1F600;"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/html-entities-decode/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"text":"A &amp; B &#x1F600;"}'
```

The machine-readable contract is at [/v1/tools/html-entities-decode/versions/1.0.0](/v1/tools/html-entities-decode/versions/1.0.0).

### CLI

```sh
node cli.mjs run html-entities-decode 1.0.0 --input input.json --base-url https://computefirst.net
```

Get the client at [/clients/cli/](/clients/cli/).

## Related tools

- [Html entities encode](/tools/html-entities-encode): Escape text for safe insertion into HTML text or quoted attribute values and return the encoded text.
- [Fixed width records parse](/tools/fixed-width-records-parse): Parse fixed-width records with explicit offsets, widths, alignment, padding, Unicode units, and bounded diagnostics.
- [Asn1 der parse](/tools/asn1-der-parse): Parse one ASN.1 DER value into a flat schema-free TLV node list.
- [Gitconfig parse](/tools/gitconfig-parse): Parse git config text into ordered sections, subsections, and multivar entries.
- [Toml10 format](/tools/toml10-format): Emit canonical TOML 1.0 source from a typed document tree.
- [Toml10 parse](/tools/toml10-parse): Parse TOML 1.0 into typed nodes with exact int64, floats, and datetimes.
