- 3 minutes to read

Formula - base64encode

Easily encode text to base64 using the Nodinite base64encode Formula plugin. This page shows how to encode strings from message Content, Context, or the output of other formulas.

🎯 Designed for business users and integrators — no developer required; you can even use AI to craft expressions.

  • ✅ Encode text from any Payload or Context in any Log Event
  • ✅ Support for character encodings like UTF-8, ISO-8859-1, and more
  • ✅ Transform and surface meaningful data in Nodinite Log Views, search filters, and self-service diagnostics
  • ✅ Combine with other Formula functions for powerful, layered expressions

What does the base64encode Formula do?

The base64encode(Content) or base64encode(Content, 'Encoding') Formula function encodes a string to base64 format. Use it on message bodies, context values, or the results from other Formula functions to encode data in your views.


How it works: Input ➜ base64encode ➜ Result

graph LR A["Input: Plain text"] --> B["base64encode(Content, 'Encoding')"] B --> C["Result: Base64-encoded string"]

Flow: The plain text content is encoded to base64 format, optionally using a specified character encoding.


Examples

Example 1: Encode text from message body

Input

Message body is Nodinite

Formula Expression

base64encode(body)

Result

Tm9kaW5pdGU=

Example 1


Example 2: Encode text with ISO-8859-1 encoding

Input

Message body is Skellefteå

Formula Expression

base64encode(body, 'iso-8859-1')

Result

U2tlbGxlZnRl5Q==

Example 2


Example 3: Encode text with UTF-8 encoding

Input

Message body is Skellefteå

Formula Expression

base64encode(body, 'utf-8')

Result

U2tlbGxlZnRlw6U=

Example 3


Example 4: Encode text from context value

Input

Message context contains a property id with value Simple

Formula Expression

base64encode(context('id'))

Result

U2ltcGxl

Example 4


Example 5: Encode text from nested formula result

Input

Message body is:

[ { "name": "Hello" }, { "name": "World" } ]

Formula Expression

base64encode(jsonpath('$..name',body))

Result

SGVsbG8=, V29ybGQ=

Example 5


Features

Important

The base64encode Formula converts text strings to base64-encoded format, making it easier to transmit or store data in Nodinite. You can optionally specify a character encoding (e.g., UTF-8, ISO-8859-1) when encoding the string.

  • Flexible Inputs: Encode from message body, Context, or the result of another Formula
  • Encoding Support: Optionally specify encoding (e.g., UTF-8, ISO-8859-1) to handle different character sets (see List of encodings)
  • Composable: Combine with other Formula functions like jsonPath or xPath for advanced transformations
  • Self-Service: Let business users encode and analyze text content without developer intervention
  • Performance Note: This function loads the entire message into RAM—use on small messages only

How to use

To use the base64encode Formula in a Search Field Expression:

  1. Open your Nodinite Web Client
  2. Navigate to AdministrationSearch Fields
  3. Create or edit a Search Field
  4. Choose Formula as the expression type
  5. Enter one of the following Syntax patterns

Syntax

Encode message body:

base64encode(body)

Encode message context property:

base64encode(context('PropertyName'))

Encode with nested formula (jsonPath example):

base64encode(jsonpath('$..name', body))

Encode with specific encoding (UTF-8):

base64encode(body, 'utf-8')

Encode with specific encoding (ISO-8859-1):

base64encode(body, 'iso-8859-1')

Next step