# Base58.toHex

Decodes a Base58-encoded string to [`Hex.Hex`](/api/Hex/types#hex).

## Imports

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

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

## Examples

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

const value = Base58.toHex('2NEpo7TZRRrLZSi2U')
// @log: '0x48656c6c6f20576f726c6421'
```

## Definition

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

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

## Parameters

### value

* **Type:** `string`

The Base58 encoded string.

## Return Type

The decoded hex string.

`Hex.Hex`
