# Value.formatEther

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

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

## Definition

```ts
function formatEther(
  wei: bigint,
  unit?: 'wei' | 'gwei' | 'szabo' | 'finney',
): 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' | 'gwei' | 'szabo' | 'finney'`
* **Optional**

The unit to format the Value in.

## Return Type

The Ether string representation of the Value.

`string`
