Text to binary converter
Convert text to binary, octal or decimal byte values and back again.
Input
Result
Fill in the input and press Run.
Your input is processed in memory and then discarded. It is not stored or logged. Even so, don't paste live passwords or keys into any online tool.
Use it from code or an agent
curl -s https://setget.net/v1/tools/binary-text \
-H 'Content-Type: application/json' \
-d '{"input":{"text":"Hi"}}'
import json, urllib.request
body = {'input': {'text': 'Hi'}}
request = urllib.request.Request("https://setget.net/v1/tools/binary-text", json.dumps(body).encode(),
{"Content-Type": "application/json"})
print(json.load(urllib.request.urlopen(request))["result"])
const response = await fetch("https://setget.net/v1/tools/binary-text", {
method: "POST",
headers: {"Content-Type": "application/json"},
body: JSON.stringify({"input":{"text":"Hi"}}),
});
console.log((await response.json()).result);
Tool: run_tool
Arguments:
{
"slug": "binary-text",
"input": {
"text": "Hi"
}
}
{
"input": {
"text": "Hi"
}
}
Endpoint: POST /v1/tools/binary-text. Over MCP: run_tool with slug: "binary-text".
Machine-readable: input schema, Markdown. Connect an agent.
Inputs
| Name | Type | Required | What it does |
|---|---|---|---|
text |
string | yes | The text to convert, or the byte values to turn back into text. |
action |
string | no | Encode text to numbers, or decode numbers to text. One of: encode, decode. Default: "encode". |
base |
string | no | How each byte is written: binary (8 digits), octal (3 digits) or decimal. One of: binary, octal, decimal. Default: "binary". |
Examples
Input
{
"text": "Hi"
}Result
{
"text": "01001000 01101001",
"bytes": 2
}Decimal byte values (ASCII codes)
Input
{
"text": "Hi",
"base": "decimal"
}Result
{
"text": "72 105",
"bytes": 2
}Binary without spaces
Input
{
"text": "0100100001101001",
"action": "decode"
}Result
{
"text": "Hi",
"encoding": "utf-8",
"binary": false,
"bytes": 2
}Input
{
"text": "110 151",
"action": "decode",
"base": "octal"
}Result
{
"text": "Hi",
"encoding": "utf-8",
"binary": false,
"bytes": 2
}Questions
- Why does one character give several numbers?
- Text is stored as UTF-8 bytes. Plain English letters take one byte each, while accented letters, other scripts and emoji take two to four.
- How should the numbers be separated for decoding?
- With spaces, commas or line breaks. Binary in full groups of 8 digits and octal in groups of 3 can also be run together.
Related tools
- Hex encoder and decoderConvert text to hexadecimal bytes and back, with optional upper case and separators.
hex - String bytes and code pointsShow the UTF-8, UTF-16 and UTF-32 bytes and the Unicode code points of a text.
string-escape-bytes - Base64 encoder and decoderEncode text to Base64 or decode it back, in the standard or URL-safe alphabet.
base64 - Morse code translatorTranslate text to international Morse code and back, with "/" between words.
morse - All hashes at onceCompute every supported hash of one input at once: MD5, SHA-1, SHA-2, SHA3-256 and BLAKE2b.
hash-all - Base32 encoder and decoderEncode text to Base32 (RFC 4648) or decode it back, with or without padding.
base32