# Asn1 oid format

`asn1-oid-format` · version 1.0.0 · Encoding & checksums · free, no key needed

Format numeric object identifier arcs as dotted text or brace notation.

**Use when you need to: format numeric oid arcs · arcs to dotted object identifier · arcs to x.680 brace notation.**

## Decide before calling

Read the [versioned contract](/v1/tools/asn1-oid-format/versions/1.0.0) and the supported scope below. Reuse `asn1-oid-format@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 `asn1-oid-format@1.0.0` for format numeric oid arcs. 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

- format numeric oid arcs
- arcs to dotted object identifier
- arcs to x.680 brace notation
- render an object identifier value
- write canonical oid text
- numeric arcs to oid notation
- format oid without a name registry
- עיצוב מזהה אובייקט

## Not supported

- parse object identifier notation that contains names
- encode arcs as der contents
- look up an oid in a registry
- emit a relative object identifier

## Behavior

- notation dotted joins the arcs with periods. notation braces emits {n n n} with one space between arcs and no space inside the braces. Names are never emitted.
- Each arc is a canonical decimal string. The first arc is 0, 1, or 2. When the first arc is 0 or 1 the second arc is 0..39. At least two arcs are required.
- max_arcs is checked on the array length before any item is inspected. max_arc_digits is then checked on each string's length before the digit grammar. Both caps apply to every call.
- A non-array arcs value, a bad notation, or a non-canonical arc is invalid_input. An array longer than max_arcs, or an arc string longer than max_arc_digits, is limit_exceeded.
- Disclaimer: format transform only; provides no confidentiality, integrity, or authenticity.

## Input

- `arcs` (array of string, required): min items 2; max items 32; each min length 1; each max length 48; each pattern `^(0|[1-9][0-9]*)$`
- `notation` (one of "dotted", "braces", required)

## Output

- `text` (string, required): min length 3; max length 2048

## Limits

- max arcs: 32
- max arc digits: 48

## Example

Request input:

```json
{
  "arcs": [
    "2",
    "999",
    "3"
  ],
  "notation": "braces"
}
```

Response:

```json
{
  "result": {
    "text": "{2 999 3}"
  }
}
```

## How to call it

### MCP

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

```json
{
  "id": "asn1-oid-format",
  "version": "1.0.0",
  "input": {
    "arcs": [
      "2",
      "999",
      "3"
    ],
    "notation": "braces"
  }
}
```

### HTTP (no key)

```sh
curl -X POST https://computefirst.net/v1/tools/asn1-oid-format/versions/1.0.0/execute \
  -H "Content-Type: application/json" \
  -d '{"arcs":["2","999","3"],"notation":"braces"}'
```

The machine-readable contract is at [/v1/tools/asn1-oid-format/versions/1.0.0](/v1/tools/asn1-oid-format/versions/1.0.0).

### CLI

```sh
node cli.mjs run asn1-oid-format 1.0.0 --input input.json --base-url https://computefirst.net
```

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

## Related tools

- [Asn1 oid parse](/tools/asn1-oid-parse): Parse an X.680 object identifier value into numeric arcs and dotted form.
- [Pem envelope format](/tools/pem-envelope-format): Format a label and lowercase hex bytes as a canonical RFC 7468 PEM envelope.
- [Bech32 convert bits](/tools/bech32-convert-bits): Regroup integers between bit widths using BIP 173 rules, rejecting bad leftover padding.
- [Bech32 encode](/tools/bech32-encode): Encode lowercase HRP and 5-bit data as Bech32 or Bech32m text using that checksum.
- [Bech32 decode](/tools/bech32-decode): Decode Bech32 or Bech32m text into a lowercase HRP, 5-bit data, and the checksum variant.
- [Bech32 validate](/tools/bech32-validate): Check Bech32 or Bech32m text and return a reason, without throwing when the checksum fails.
