- 2 minutes to read

Formula - base64decode

The base64decode Formula in Nodinite lets you decode any base64-encoded string from message body, context, or even nested formulas. This page provides a clear, step-by-step guide with practical examples, so you can quickly master base64 decoding for your integration needs.

✅ Decode base64-encoded data from message body or context
✅ Use with nested formulas for advanced scenarios
✅ Support for character encoding (e.g., UTF-8, ISO-8859-1)


What is the base64decode formula?

The base64decode function decodes a base64-encoded string back to its original format. You can use it on message body, context, or the result of another formula. Optionally, specify a character encoding.


How does it work?

Each example below is structured in three clear steps:

  1. Input – The data or context you start with
  2. Formula – The base64decode expression you use
  3. Result – The output you get

Examples

Example 1: Decode base64 from message body

Input:

Tm9kaW5pdGU=

Formula:

base64decode(body)

Result:

Nodinite

Example 1
Decodes the base64-encoded message body to 'Nodinite'


Example 2: Decode base64 with ISO-8859-1 encoding

Input:

U2tlbGxlZnRl5Q==

Formula:

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

Result:

Skellefteå

Example 2
Decodes the base64-encoded message body using ISO-8859-1 encoding


Example 3: Decode base64 with UTF-8 encoding

Input:

U2tlbGxlZnRlw6U=

Formula:

base64decode(body, 'UTF-8')

Result:

Skellefteå

Example 3 Decodes the base64-encoded message body using UTF-8 encoding


Example 4: Decode base64 from context value

Input:

bm9kaW5pdGU=

Formula:

base64decode(context('id'))

Result:

nodinite

![Example 4][4] Decodes the base64-encoded context value


Example 5: Decode base64 from nested formula result

Input:

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

Formula:

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

Result:

awesome, function

![Example 5][5] Decodes each base64-encoded name returned by the jsonpath function.


Usage Tips

  • Use with any Content that returns base64-encoded text
  • Works with jsonpath, xpath, or other formula functions
  • Only use on small messages—this function loads the entire message into RAM
  • Optionally specify a character encoding (see List of encodings)

Next Step

Add or manage Search Fields
Add or manage Log Views