Skip to main content

Base64 Encode

Decode

Synopsis

Encodes string values to Base64 using standard encoding, compatible with Kusto's base64_encode_tostring() function.

Schema

- base64_encode:
field: <ident>
target_field: <ident>
description: <text>
disabled: <boolean>
if: <script>
ignore_failure: <boolean>
ignore_missing: <boolean>
on_failure: <processor[]>
on_success: <processor[]>
tag: <string>

Configuration

FieldRequiredDefaultDescription
fieldYSource field containing value to encode
target_fieldNSame as fieldTarget field to store encoded result
descriptionNExplanatory note
disabledNfalseDisable processor execution
ifNCondition to run
ignore_failureNfalseContinue processing if encoding fails
ignore_missingNfalseSkip processing if referenced field doesn't exist
on_failureNSee Handling Failures
on_successNSee Handling Success
tagNIdentifier

Details

Encodes field values to Base64 using standard encoding (RFC 4648). The processor automatically converts non-string values to strings before encoding.

The encoding uses Base64 standard alphabet with padding, producing output compatible with most Base64 decoders including Azure Kusto's base64_encode_tostring() function.

Non-string values (numbers, booleans) are automatically converted to their string representation before encoding. For example, the number 12345 becomes the string "12345" which encodes to MTIzNDU=.

Default target field behavior: if not specified, overwrites the source field with encoded result.

Examples

Basic String Encoding

Encoding text to Base64 format...

{
"message": "Hello World"
}
- base64_encode:
field: message
target_field: encoded_message

Creates new field with Base64 encoded value...

{
"message": "Hello World",
"encoded_message": "SGVsbG8gV29ybGQ="
}

In-Place Encoding

Encoding field value in place without target field...

{
"message": "Kusto"
}
- base64_encode:
field: message

Replaces original field with encoded value...

{
"message": "S3VzdG8="
}

Special Characters

Encoding strings with special characters...

{
"message": "Hello@123!#$%"
}
- base64_encode:
field: message
target_field: encoded

Handles special characters correctly...

{
"message": "Hello@123!#$%",
"encoded": "SGVsbG9AMTIzISMkJQ=="
}

Number Encoding

Encoding numeric values as strings...

{
"number": 12345
}
- base64_encode:
field: number
target_field: encoded

Converts number to string before encoding...

{
"number": 12345,
"encoded": "MTIzNDU="
}

Error Handling

Handling missing fields gracefully...

{
"other_field": "value"
}
- base64_encode:
field: nonexistent
target_field: encoded
ignore_missing: true

Skips processing when field doesn't exist...

{
"other_field": "value"
}