Skip to content
PithLab

↑↓ to move · Enter to open · Esc to close

Text to Binary API

Convert text to its UTF-8 bytes as space-separated binary (8-bit) or hex groups, or decode binary/hex bytes back to text.

POST /api/v1/tools/text-to-binaryMCP text_to_binaryText & Writing

Convert text to binary or hexadecimal UTF-8 bytes and back. Handles emoji and accented letters, and explains exactly what is wrong with invalid input.

Input

Send these as a JSON object. Unknown fields are rejected.

input
Text to encode, or binary/hex bytes to decode (spaces optional). (string, required)
direction
encode (text → bytes) or decode (bytes → text). (string, one of encode, decode, default "encode")
format
binary (01001000) or hex (48). (string, one of binary, hex, default "binary")
uppercase
Uppercase hex digits when encoding to hex. (boolean, default false)
curl https://pithlab.com/api/v1/tools/text-to-binary \n  -H "Authorization: Bearer $PITHLAB_KEY" \n  -H "Content-Type: application/json" \n  -d '{"input":"Hi!","direction":"encode","format":"binary"}'
Example response
{
  "ok": true,
  "result": {
    "output": "01001000 01101001 00100001"
  }
}