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

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

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

## Imports

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

## Examples

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

Value.fromEther('420')
// @log: 420000000000000000000n
```

## Definition

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

## Parameters

### ether

* **Type:** `string`

String representation of Ether.

### unit

* **Type:** `'wei' | 'gwei' | 'szabo' | 'finney'`
* **Optional**

The unit to parse to.

## Return Type

A `bigint` Value.

`bigint`
