> **Can't find what you're looking for?** Use `search_docs` on the docs MCP server at `https://v3.viem.sh/api/mcp` to find what you need.

# Value.format

:::info
`Value.format` is a re-export of ox's [`Value.format`](https://oxlib.sh/api/Value/format). Refer to the ox documentation for the full reference.
:::

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

## Imports

```ts
import { Value } from 'viem/utils'
```

## Examples

```ts twoslash
// @noErrors
import { Value } from 'viem/utils'

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

## Definition

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

## 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`
