# Value.format

Formats a `bigint` Value to its string representation (divided by the given exponent).

## Imports

:::code-group
```ts [Named]
import { Value } from 'ox'
```

```ts [Entrypoint]
import * as Value from 'ox/Value'
```
:::

## Examples

```ts twoslash
import { Value } from 'ox'

Value.format(420_000_000_000n, 9)
// @log: '420'
```

## Definition

```ts
function format(
  value: bigint,
  decimals?: number,
): string
```

**Source:** [src/core/Value.ts](https://github.com/wevm/ox/blob/main/src/core/Value.ts#L279)

## Parameters

### value

* **Type:** `bigint`

The `bigint` Value to format.

### decimals

* **Type:** `number`
* **Optional**

The exponent to divide the `bigint` Value by.

## Return Type

The string representation of the Value.

`string`
