# Value.formatGwei

Formats a `bigint` Value (default: wei) to a string representation of Gwei.

## 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.formatGwei(1_000_000_000n)
// @log: '1'
```

## Definition

```ts
function formatGwei(
  wei: bigint,
  unit?: 'wei',
): string
```

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

## Parameters

### wei

* **Type:** `bigint`

The Value to format.

### unit

* **Type:** `'wei'`
* **Optional**

The unit to format the Value in.

## Return Type

The Gwei string representation of the Value.

`string`
