> ## Documentation Index
> Fetch the complete documentation index at: https://docs.dune.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Tron address functions

> Utilities for working with TRON's custom address format.

Tron blockchain adopted a custom type of addresses. It is similar to [Base58](/query-engine/Functions-and-operators/base58) encoding format, with some modifications.

Under basic tron address encoding format an address can be encoded as:

```
base58encode ( concat ( <constant-prefix>, <address>, <checksum> ) )
```

## Functions

#### from\_tron\_address()

**`from_tron_address(varchar)`** → `varbinary`

Converts a Tron address string to the corresponding `VARBINARY` hex address.

```sql theme={null}
SELECT 
    from_tron_address('THHRK1bA7YRPZBcLnTP1SZy9ipUpsRwpo6')
-- results in VARBINARY 0x503aa4ad108bd3a89ba0310e23b49fb654cd6986
```

#### to\_tron\_address()

**`to_tron_address(varbinary)`** → `varchar`

Encodes a `VARBINARY` hex address to the corresponding Tron address.

```sql theme={null}
SELECT 
    to_tron_address(0x503aa4ad108bd3a89ba0310e23b49fb654cd6986)
-- results 'THHRK1bA7YRPZBcLnTP1SZy9ipUpsRwpo6'
```
