Syntax\n------\n\nTO_BASE64(str)\n\nDescription\n-----------\n\nConverts the string argument str to its base-64 encoded form, returning the result as a character string in the connection character set and collation.\n\nThe argument str will be converted to string first if it is not a string. A NULL argument will return a NULL result.\n\nThe reverse function, FROM_BASE64(), decodes an encoded base-64 string.\n\nThere are a numerous different methods to base-64 encode a string. The following are used by MariaDB and MySQL:\n\n Alphabet value 64 is encoded as '+'.\n Alphabet value 63 is encoded as '/'.\n Encoding output is made up of groups of four printable characters, with each three bytes of data encoded using four characters. If the final group is not complete, it is padded with '=' characters to make up a length of four.\n To divide long output, a newline is added after every 76 characters.\n* Decoding will recognize and ignore newlines, carriage returns, tabs, and spaces.\n\nExamples\n--------\n\nSELECT TO_BASE64('Maria');\n+--------------------+\n| TO_BASE64('Maria') |\n+--------------------+\n| TWFyaWE=           |\n+--------------------+\n\nURL: https://mariadb.com/docs/server/reference/sql-functions/string-functions/to_base64