Skip to content
On this page

formatEther

Converts numerical wei to a string representation of ether.

Import

ts
import { formatEther } from 'viem'

Usage

ts
import { formatEther } from 'viem'

formatEther(1000000000000000000n) 
// '1'

Returns

string

Parameters

value

  • Type: bigint

The wei value.

Released under the MIT License.