> **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.formatEther

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

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

## Imports

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

## Examples

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

Value.formatEther(1_000_000_000_000_000_000n)
// @log: '1'
```

## Definition

```ts
function formatEther(
  wei: bigint,
  unit?: 'wei' | 'gwei' | 'szabo' | 'finney',
): string
```

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