Skip to main content

base64Encode Search Operator

The base64Encode operator takes an ASCII or non-ASCII string and converts it to a base64 string.

Syntax

base64Encode("<string>") as <field>
base64Encode(<string_field>) as <field>

Example

The following example returns base64 with a value of aGVsbG8gd29ybGQ=:

| base64Encode("hello world") as base64

The Base64Encode function supports encoding non-ASCII characters in addition to ASCII. The following example returns base64 with a value of 5LiWIOOCiOOBhOOBoQ==:

| base64encode("世 よいち") as base64
note

Make sure that the encoding format you use matches the decoding format.

Status
Legal
Privacy Statement
Terms of Use

Copyright © 2025 by Sumo Logic, Inc.