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

# Abi.format

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

Formats an [`Abi.Abi`](/docs/utilities/abi/types#abi) into a **Human Readable ABI**.

## Imports

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

## Examples

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

const formatted = Abi.format([
  {
    type: 'function',
    name: 'approve',
    stateMutability: 'nonpayable',
    inputs: [
      {
        name: 'spender',
        type: 'address'
      },
      {
        name: 'amount',
        type: 'uint256'
      }
    ],
    outputs: [{ type: 'bool' }]
  }
])

formatted
//    ^?
```

## Definition

```ts
function format(
  abi: Abi | readonly unknown[],
): readonly string[]
```

## Parameters

### abi

* **Type:** `Abi | readonly unknown[]`

The ABI to format.

## Return Type

The formatted ABI.

`readonly string[]`
