All Products
Search
Document Center

MaxCompute:BASE32

Last Updated:Sep 17, 2026

This function converts a binary value to a BASE32-encoded string.

Syntax

STRING BASE32(BINARY <value>)

Parameters

value: Required. The BINARY value that you want to convert.

Return value

Returns a STRING value. If the input parameter is NULL, the return value is NULL.

Examples

  • Example 1: Convert the string alibaba to a binary value and then perform BASE32 encoding. Sample command:

    -- Returns MFWGSYTBMJQQ====.
    SELECT BASE32(CAST('alibaba' AS BINARY));
  • Example 2: The input parameter is NULL. Sample command:

    -- Returns NULL.
    SELECT BASE32(NULL);

Related functions

BASE32 is a string function. For more information about functions that are used to search for strings or convert string formats, see String Functions Overview.