Data Converter icon

Data Converter

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

Overview

The "Text to Binary" operation of the Binary resource in this Data Converter node converts textual input into binary data. This is useful when you need to transform plain text into a binary format for further processing, storage, or transmission where binary representation is required.

Common scenarios include:

  • Preparing text content for file creation or upload as a binary file.
  • Encoding textual data to binary before sending it to systems that require binary input.
  • Converting logs, messages, or any string data into binary form for encryption or compression workflows.

For example, converting a JSON string or plain text message into a binary buffer that can be saved as a .txt file or sent over a binary protocol.

Properties

Name Meaning
Output Binary Whether to output the result as binary data (true) or as a Base64-encoded string (false).
Binary Property Name The name of the binary property to store the output binary data under (used if Output Binary is true).

Output

  • If Output Binary is set to false, the output JSON contains a Base64-encoded string representing the binary data.
  • If Output Binary is set to true, the output contains no JSON data but includes a binary property with the specified name containing the raw binary data. This binary data is prepared with MIME type text/plain and filename file.txt.

Thus, the output either provides the binary data as a Base64 string in JSON or as actual binary data attached to the output item.

Dependencies

  • No external services are required.
  • The node uses internal utility functions for binary operations.
  • No special credentials or environment variables are needed.

Troubleshooting

  • Issue: Input text is empty or missing.

    • Error: The node may throw an error or produce empty output.
    • Resolution: Ensure the "Input Data" property contains valid text.
  • Issue: Incorrect binary property name or conflicts.

    • Error: Binary data might not appear as expected.
    • Resolution: Use a unique and valid binary property name when enabling "Output Binary".
  • Issue: Misunderstanding output format.

    • Error: Users expecting JSON output may be confused if "Output Binary" is enabled.
    • Resolution: Remember that enabling "Output Binary" switches output from JSON to binary data.

Links and References

Discussion