- 2 minutes to read

base64decode Formula function

The base64decode(Content) Formula function decodes any base64encoded Content back to its original format.

Quick example

Let's get you started with the following example. For other, and more advanced examples please scroll down on this page to the Examples section.

Input Expression Result



Text Data from Body part of logged event base64decode expression Unique values


  • Decodes base64encoded strings back to its original format.
  • Extracts single value only from Content
  • Can be applied on any valid Content that return base64encoded data; Like jsonpath, xpath functions, review Formula user guide for complete list of functions.

This plugin loads the entire message into RAM, so make sure to apply this function only on small messages.

How to use

To use the base64decode function the Content parameter should contain a base64encoded string (otherwise it will fail and you will end up with garbage result). But first and foremost we have to configure the Formula plugin:

  • Select Formula as expression type plugin.
  • Write down the expression to use in the 'Expression' text area.
  • Input a proper Content as parameter to the function.


Use the base64decode function with any of the following parameters:

  • From Message Body: base64decode(body)

  • From Message Context: base64decode(context('MessageContextKey'))

  • Result from previous Formula operation base64decode(SomeOtherNestedFormulaFunction(Content))


Below you will find different common examples for how to use the base64decode function.

Body as Content

The message body is base64 encoded text, by using the provided expression, the result is nodinite.


Message Body




Context as Content

Example: If "bm9kaW5pdGU=" is the value for the corresponding key "id", the result is "nodinite" when we apply base64decode function on the message context value as shown below.

e.g. base64decode(context('id'))


Message Context Value




Formula Function as Content

The message body is json structure, by using the provided expression, the result is Hello, World.

e.g. base64decode(jsonpath('$..name',body))


Message Body

	{ "name": "YXdlc29tZQ==" },
	{ "name": "ZnVuY3Rpb24=" }



You can use (any Formula plugin function) to extract the base64encoded data and base64decode to its original format.

Next Step

How to Add or manage Search Fields
How to Add or manage Log Views

Expression Type Plugins are used in Search Fields
What are Search Fields?
What are Search Field Expressions?
What are Message Types?
What are Log Views?