# Chalk SQL Reference: Conversion Functions
source: https://docs.chalk.ai/chalksql-docs#section-conversion-functions

## `from_base(string, radix)`
source: https://docs.chalk.ai/chalksql-docs#from_base

Converts a `string` representation of a number in a given base to an integer.

**Parameters**

- `string`: `large_string`
  The input `string`.
- `radix`: `int64`
  The base (`radix`) to convert to.

## `from_utf8(binary, ...)`
source: https://docs.chalk.ai/chalksql-docs#from_utf8

Decodes UTF-8 encoded `binary` data, optionally replacing invalid sequences.

**Overloads**

#### `from_utf8(binary, replace)`

Decodes UTF-8 encoded `binary`, replacing invalid sequences with the given code point.

**Parameters**

- `binary`: `large_binary`
  The input `binary` value.
- `replace`: `int64`

#### `from_utf8(binary, replace)`

Decodes UTF-8 encoded `binary`, replacing invalid sequences with the given string.

**Parameters**

- `binary`: `large_binary`
  The input `binary` value.
- `replace`: `large_string`

#### `from_utf8(binary)`

Decodes UTF-8 encoded `binary` data into a string.

**Parameters**

- `binary`: `large_binary`
  The input `binary` value.

## `to_base(value, radix)`
source: https://docs.chalk.ai/chalksql-docs#to_base

Converts an integer to its string representation in the specified base.

**Parameters**

- `value`: `int64`
  The integer to convert.
- `radix`: `int64`
  The base (`radix`) to convert to.

## `to_utf8(string)`
source: https://docs.chalk.ai/chalksql-docs#to_utf8

Encodes a `string` to UTF-8 binary data.

**Parameters**

- `string`: `large_string`
  The input `string`.
