Binary To/From File Converter
Convert data between base64, hexadecimal, and binary string representations, and convert files to/from base64 encoding.
Actions
base64-to-hex
Convert a base64-encoded string to hexadecimal.
Required fields:
action:"base64-to-hex"input: Base64-encoded string
Example:
{
"action": "base64-to-hex",
"input": "SGVsbG8gV29ybGQ="
}
Returns: { "encoding": "hex", "hex": "48656c6c6f20576f726c64", "size_bytes": 11 }
hex-to-base64
Convert a hexadecimal string to base64 encoding.
Required fields:
action:"hex-to-base64"input: Hexadecimal string (even number of characters, 0-9 and a-f)
Example:
{
"action": "hex-to-base64",
"input": "48656c6c6f20576f726c64"
}
Returns: { "encoding": "base64", "base64": "SGVsbG8gV29ybGQ=", "size_bytes": 11 }
base64-to-binary
Convert a base64-encoded string to a binary (0s and 1s) string representation.
Required fields:
action:"base64-to-binary"input: Base64-encoded string
Example:
{
"action": "base64-to-binary",
"input": "SGk="
}
Returns: { "encoding": "binary", "binary": "01001000 01101001", "size_bytes": 2 }
binary-to-base64
Convert a binary string (0s and 1s) back to base64 encoding.
Required fields:
action:"binary-to-base64"input: Binary string of 0s and 1s (length must be a multiple of 8; spaces between bytes are allowed)
Example:
{
"action": "binary-to-base64",
"input": "01001000 01101001"
}
Returns: { "encoding": "base64", "base64": "SGk=", "size_bytes": 2 }
file-to-base64
Read a previously uploaded file and return its contents as a base64-encoded string.
Required fields:
action:"file-to-base64"file_id: The file ID of an uploaded file
Example:
{
"action": "file-to-base64",
"file_id": "abc123def456"
}
Returns: { "file_id": "abc123def456", "filename": "report.pdf", "content_type": "application/pdf", "size_bytes": 4096, "base64": "..." }
base64-to-file
Decode a base64 string and save it as a file in cloud storage.
Required fields:
action:"base64-to-file"input: Base64-encoded file contentfilename: Name for the created file (e.g.,"output.png")
Optional fields:
content_type: MIME type for the file (default:"application/octet-stream"). Use the appropriate type, e.g.,"image/png","application/pdf".expiration_days: Number of days until the file expires, 1-7 (default: 7)
Example:
{
"action": "base64-to-file",
"input": "iVBORw0KGgo...",
"filename": "screenshot.png",
"content_type": "image/png",
"expiration_days": 3
}
Returns: { "file_id": "...", "filename": "screenshot.png", "content_type": "image/png", "size_bytes": 2048, "signed_url": "https://...", "signed_url_expires_in": "..." }
Common Workflows
- Encode a file for transmission: Use
file-to-base64to get a file's base64 content, then share or embed it. - Reconstruct a file from base64 data: Use
base64-to-fileto decode received base64 data back into a downloadable file. - Inspect binary content: Chain
file-to-base64thenbase64-to-hexorbase64-to-binaryto view raw byte contents of a file. - Convert between encodings: Use any combination of the encoding actions to translate between base64, hex, and binary formats.
Important Notes
- File size limit for
file-to-base64is 10 MB. Larger files cannot be returned inline. - Binary strings must have a length that is a multiple of 8 (one complete byte per group). Spaces between byte groups are allowed.
- Hex strings must have an even number of characters.
- Files created with
base64-to-fileare stored in cloud storage and expire after the specified number of days (default 7). - The
signed_urlreturned bybase64-to-fileprovides a temporary download link for the created file.







