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

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

Parses a `string` representation of a Value to `bigint` (multiplied by the given exponent).

## Imports

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

## Examples

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

Value.from('420', 9)
// @log: 420000000000n
```

## Definition

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

## Parameters

### value

* **Type:** `string`

The string representation of the Value.

### decimals

* **Type:** `number`
* **Optional**

The exponent to multiply the Value by.

## Return Type

The `bigint` representation of the Value.

`bigint`
