# Base32.fromHex

Encodes a [`Hex.Hex`](/api/Hex/types#hex) value to a Base32-encoded string (using the BIP-173 bech32 alphabet).

## Imports

:::code-group
```ts [Named]
import { Base32 } from 'ox'
```

```ts [Entrypoint]
import * as Base32 from 'ox/Base32'
```
:::

## Examples

```ts twoslash
import { Base32 } from 'ox'

const value = Base32.fromHex('0x00ff00')
```

## Definition

```ts
function fromHex(
  value: Hex.Hex,
): string
```

**Source:** [src/core/Base32.ts](https://github.com/wevm/ox/blob/main/src/core/Base32.ts#L139)

## Parameters

### value

* **Type:** `Hex.Hex`

The hex value to encode.

## Return Type

The Base32 encoded string.

`string`
