> For the complete documentation index, see [llms.txt](https://docs.internetobject.org/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://docs.internetobject.org/schema-definition-language/data-types/bigint.md).

# BigInt

The **`bigint`** type validates an arbitrary-precision integer — values too large for the double-based `number` family (see [Numeric Types](/schema-definition-language/data-types/number.md)). In data it is written with an `n` suffix: `123n`, `0xFFn`.

> For the literal syntax, see [BigInt values](/structure-and-syntax/values/number/bigint.md).

## TypeDef

A `bigint` MemberDef accepts only the options below. Any other key is invalid.

| Option       | Type            | Description                                                        |
| ------------ | --------------- | ------------------------------------------------------------------ |
| `type`       | string          | The type name `bigint`. First positional value.                    |
| `default`    | bigint          | Value used when the member is omitted. Second positional value.    |
| `choices`    | array of bigint | Restricts the value to a fixed set.                                |
| `min`        | bigint          | Minimum allowed value (inclusive).                                 |
| `max`        | bigint          | Maximum allowed value (inclusive).                                 |
| `multipleOf` | bigint          | The value must be an exact multiple of this.                       |
| `format`     | string          | Serialization base: `decimal` (default), `hex`, `octal`, `binary`. |
| `optional`   | bool            | If `true`, the member may be omitted. Shorthand: `?` suffix.       |
| `null`       | bool            | If `true`, the member may be `null`. Shorthand: `*` suffix.        |

## Examples

```ruby
id: bigint
---
~ 123n                  # ✓
~ 0xFFn                 # ✓ (255)
~ 99999999999999999999999999999n   # ✓
```

```ruby
big: { bigint, min: 100n }
---
~ 50n     # ✗ invalid-range
```

## Optional, nullable & defaults

Resolution follows the [common rules](/schema-definition-language/data-types/number.md#optional-nullable--defaults):

```ruby
id?*: bigint    # optional + nullable
---
~ {}     # ✓ omitted → absent
~ N      # ✓ null
~ 7n     # ✓
```

## Implementation status (beta)

* Keyed `null:` is not yet honored — use the `*` suffix.

## See Also

* [BigInt values](/structure-and-syntax/values/number/bigint.md)
* [Numeric Types](/schema-definition-language/data-types/number.md) · [Decimal](/schema-definition-language/data-types/decimal.md)
* [TypeDef](/schema-definition-language/advanced-schema-concepts/typedef.md) · [MemberDef](/schema-definition-language/advanced-schema-concepts/memberdef.md)


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.internetobject.org/schema-definition-language/data-types/bigint.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
