utils_convertData
Converts data between utf8, hex, base64, and binary formats for use in blockchain, encryption, or file processing. Requires source and target encoding parameters.
Instructions
Converts data between different encodings (utf8, hex, base64, binary). Useful for transforming data formats when working with blockchain data, encryption, or file processing.
Parameters:
data (required): The string to convert
from (required): Source encoding format (utf8, hex, base64, or binary)
to (required): Target encoding format (utf8, hex, base64, or binary)
Example usage:
UTF-8 to hex: {"data": "hello world", "from": "utf8", "to": "hex"} → 68656c6c6f20776f726c64
UTF-8 to base64: {"data": "Hello World", "from": "utf8", "to": "base64"} → SGVsbG8gV29ybGQ=
base64 to UTF-8: {"data": "SGVsbG8gV29ybGQ=", "from": "base64", "to": "utf8"} → Hello World
hex to base64: {"data": "68656c6c6f20776f726c64", "from": "hex", "to": "base64"} → aGVsbG8gd29ybGQ=
Notes:
All parameters are required
The tool returns the converted data as a string
For binary conversion, data is represented as an array of byte values
Input Schema
Name | Required | Description | Default |
---|---|---|---|
args | Yes |