# Utf32 BOM inspect

`utf32-bom-inspect` · version 1.0.0 · Encoding & checksums · free, no key needed

Inspect base64 bytes for UTF-32 alignment and a UTF-32LE or UTF-32BE byte-order mark without guessing.

**Use when you need to: inspect UTF-32 BOM · detect UTF-32 byte order mark · identify UTF-32LE BOM.**

## Decide before calling

Read the [versioned contract](/v1/tools/utf32-bom-inspect/versions/1.0.0) and the supported scope below. Reuse `utf32-bom-inspect@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 `utf32-bom-inspect@1.0.0` for inspect UTF-32 BOM. 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

- inspect UTF-32 BOM
- detect UTF-32 byte order mark
- identify UTF-32LE BOM
- identify UTF-32BE BOM
- check four-byte alignment
- show leading UTF-32 bytes

## Not supported

- guess endian without BOM
- validate all encoded scalar values

## Behavior

- Implements Unicode Standard 16.0, Unicode Encoding Schemes.
- Recognizes only FF FE 00 00 as UTF-32LE BOM and 00 00 FE FF as UTF-32BE BOM.
- No byte-order guess is made when no BOM exists.
- leading_hex contains at most the first four bytes in lowercase hexadecimal.
- Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity.

## Input

- `base64` (string, required): min length 1; max length 5464

## Output

- `byte_length` (integer, required): min 0; max 4096
- `aligned` (boolean, required)
- `bom` (one of "le", "be", "none", required)
- `suggested_endian` (one of "le", "be", null, required)
- `leading_hex` (string, required): pattern `^[0-9a-f]{0,8}$`
- `standard_version` (constant "Unicode Standard 16.0, Unicode Encoding Schemes", required)

## Limits

- max input bytes: 4096
- max inspected bytes: 4

## Example

Request input:

```json
{
  "base64": "//4AAA=="
}
```

Response:

```json
{
  "result": {
    "byte_length": 4,
    "aligned": true,
    "bom": "le",
    "suggested_endian": "le",
    "leading_hex": "fffe0000",
    "standard_version": "Unicode Standard 16.0, Unicode Encoding Schemes"
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "utf32-bom-inspect",
  "version": "1.0.0",
  "input": {
    "base64": "//4AAA=="
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/utf32-bom-inspect/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"base64":"//4AAA=="}'
```

The machine-readable contract is at [/v1/tools/utf32-bom-inspect/versions/1.0.0](/v1/tools/utf32-bom-inspect/versions/1.0.0).

### CLI

```sh
node cli.mjs run utf32-bom-inspect 1.0.0 --input input.json --base-url https://computefirst.net
```

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

## Related tools

- [Utf32 decode](/tools/utf32-decode): Decode strict base64 UTF-32LE or UTF-32BE bytes after BOM, alignment, scalar, and noncharacter validation.
- [Utf32 encode](/tools/utf32-encode): Encode Unicode scalar text as bit-exact UTF-32LE or UTF-32BE base64 bytes with an optional BOM.
- [Cid parse](/tools/cid-parse): Parse a CIDv0 or CIDv1 envelope without hashing content.
- [Bech32 validate](/tools/bech32-validate): Check Bech32 or Bech32m text and return a reason, without throwing when the checksum fails.
- [Ct consistency proof verify](/tools/ct-consistency-proof-verify): Strictly verify an RFC 6962 v1 append-only consistency proof.
- [Hex bytes concat](/tools/hex-bytes-concat): Concatenate a bounded ordered list of lowercase hex byte strings into one hex string.
