# Validate address, convert address

## When you may need it?

If you want to validate an address and/or convert address to bounceable/non-bounceable base64/base64url formats and back. These types of address are sometimes used in some clients so may be useful for integration.

## Get address type

{% code overflow="wrap" %}

```javascript
let initialAddressType = await client.utils.get_address_type({address});
console.log(`Address type is ${JSON.stringify(initialAddressType)}`);
```

{% endcode %}

## Convert

Use `utils.convert_address` function for that.

```javascript
let convertedAddress = (await client.utils.convert_address({
    address,
    output_format: {
        type: "Hex"
    },
})).address;
console.log(`Address in raw format: ${convertedAddress}`);
```

### Validate

If address is incorrect the function `utils.convert_address` will fail with an error.

## Sample source code

<https://github.com/everx-labs/sdk-samples/blob/master/core-examples/node-js/utils.convert_address/index.js>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.everos.dev/ever-sdk/guides/work_with_contracts/validate_address_convert_address.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
