Data Converter icon

Data Converter

Convert between various data formats - Base64, Binary, JSON, XML, YAML, CSV, HTML, and more

Overview

The node provides a versatile "Data Converter" tool that supports multiple data format transformations. Specifically, for the Base64 resource with the Text to Base64 operation, it encodes plain text input into its Base64 representation.

This is useful in scenarios where you need to safely encode textual data for transmission or storage, such as embedding text in URLs, HTTP headers, or binary protocols that require Base64 encoding.

Example use cases:

  • Encoding API keys or tokens before sending them over HTTP.
  • Preparing text content for inclusion in data URLs or JSON payloads.
  • Converting user input text into Base64 for further processing or storage.

Properties

Name Meaning
Input Data The plain text string that you want to convert to Base64.
Binary Property Name (Optional) When outputting binary data, this sets the name of the binary property in output.

Output

The output JSON contains a field named result which holds the Base64 encoded string of the input text.

If the node is configured to output binary data (via an additional option not shown here but available in the node), the Base64 encoded data can be output as binary under the specified binary property name.

Example output JSON:

{
  "result": "SGVsbG8gd29ybGQh"
}

If binary output is enabled, the output will contain a binary property with the Base64 data prepared as a binary buffer.

Dependencies

  • No external services or API keys are required.
  • The node uses internal utility functions for Base64 encoding.
  • No special environment variables or credentials are needed.

Troubleshooting

  • Empty Input: If the "Input Data" property is empty, the output will be an empty Base64 string. Ensure the input text is provided.
  • Invalid Characters: Since the input is plain text, invalid characters are unlikely, but ensure the input is a valid string.
  • Binary Output Issues: If enabling binary output, make sure the binary property name is set correctly and downstream nodes expect binary data.
  • Error Handling: If an error occurs during encoding, the node will throw an error unless "Continue On Fail" is enabled, in which case the error message will be included in the output JSON.

Links and References

Discussion