utils_convertData
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
Read as MarkdownResult
The converted value as text; array representations are JSON-encoded.
Permissions
No spending approval is requested by this handler. Public network lookups can still fail or require a compatible service.
Also available through utility in compact mode.
Inputs and availability
Full catalog · Before wallet setup; Legacy local wallet; Legacy local identity; Local Vault · broadcasting disabled; Local Vault · all roles; Local Vault · payment role only; Project · payments scope; External BRC-100 wallet; Local Vault + sponsor; Droplit wallet
| Field | Type / required | Description |
|---|---|---|
| data | string Required | The data string to be converted |
| from | "utf8" | "hex" | "base64" | "binary" Required | Source encoding format (utf8, hex, base64, or binary) |
| to | "utf8" | "hex" | "base64" | "binary" Required | Target encoding format to convert to (utf8, hex, base64, or binary) |
Nested fields are required only when their parent object or array item is supplied.
Full input schema
{
"type": "object",
"properties": {
"data": {
"type": "string",
"description": "The data string to be converted"
},
"from": {
"type": "string",
"enum": [
"utf8",
"hex",
"base64",
"binary"
],
"description": "Source encoding format (utf8, hex, base64, or binary)"
},
"to": {
"type": "string",
"enum": [
"utf8",
"hex",
"base64",
"binary"
],
"description": "Target encoding format to convert to (utf8, hex, base64, or binary)"
}
},
"required": [
"data",
"from",
"to"
],
"$schema": "https://json-schema.org/draft/2020-12/schema"
}