to_base64()

Converts a blob to a base64 encoded string.

Arguments & returns

to_base64(blob)

Scalar
Overload link blob Returns
#01 BLOB VARCHAR

Example

to_base64 example
SQL
Haybarn WASM 1.5.5-rc3 · In your browser

Engine example · Run to view results.

In other engines

Snowflakebase64_encode()

SELECT BASE64_ENCODE(x)
In DuckDB
SELECT TO_BASE64(x)

SQLGlot example ↗