Text to binary converter
“Hi” becomes 01001000 01101001: each byte of your text written as eight zeros and ones, one group per byte, while accents and emoji take two to four groups in UTF-8. Paste binary groups to get the text back. Free in your browser.
- Free
- Runs in your browser
- No sign-up
- Your data stays on your device
Run — free
Worked example
- Text
- Hi
- Calculation mode
- Encode
- Result
- 01001000 01101001
- Input
- Hi
- Binary
- 01001000 01101001
- Groups
- 01001000, 01101001
A text to binary converter turns ordinary characters into the eight-bit patterns computers store, and a binary to text path reverses that mapping so you recover the original string. Enter plain UTF-8 text and choose encode to receive space-separated groups of eight zeros and ones—one group per byte—or paste binary groups and choose decode to rebuild the text.
How text becomes 8-bit binary and why group length matters
Computers do not store letters as shapes; they store sequences of bytes, and each byte is eight bits. For English letters in the basic Latin range, one character often maps to one byte whose decimal value is the classic ASCII code—for example capital H is seventy-two, which is zero-one-zero-zero-one-zero-zero-zero in binary. Modern text is UTF-8, so accented letters, emoji, and non-Latin scripts may need two, three, or four bytes and therefore two, three, or four eight-bit groups.
Encoding walks the UTF-8 byte sequence left to right and writes each byte as eight digits with the most significant bit first, joining groups with a single space so humans can count octets at a glance. Decoding does the reverse: it splits the input into candidate groups, requires each group to match exactly eight characters of zero or one, converts each group to a byte value between zero and two hundred fifty-five, then interprets the byte array as UTF-8.
If a group has seven bits, nine bits, or a non-binary character, the converter must fail. Continuous binary without spaces is allowed only when the total length is a multiple of eight, because each slice of eight consecutive digits is still an octet.
What you can do with it
Homework checks for ASCII and UTF-8 bit patterns
Students encode short phrases, compare hand-written eight-bit groups to the deterministic result, and decode teacher-provided binary without a spreadsheet.
Protocol and networking teaching demos
Workshops show how printable labels become octets on the wire, then force incomplete bit groups to illustrate strict framing rules.
FAQ
What does the text to binary converter output?
In encode mode it returns space-separated eight-bit groups (one per UTF-8 byte), plus arrays of groups and integer byte values. In decode mode it returns the recovered UTF-8 text.
Does it support UTF-8 and emoji?
Yes. Encoding uses UTF-8, so multi-byte characters become multiple eight-bit groups. Decoding rejects byte sequences that are not valid UTF-8.
Can I paste binary without spaces?
Yes, if the continuous string is only 0 and 1 and its length is a multiple of eight.
Is the text to binary converter free?
The browser tool is free and runs locally.
Why does my binary fail to decode?
Every group must be exactly eight digits, each a 0 or a 1. A group of seven or nine bits, or any other character, stops with a clear message instead of being padded or cut, and binary without spaces works only when its length is a multiple of eight.
Related tools
For developers — API access
Everything on this page is available programmatically. This section is for teams who want to wire it into their own systems; everyone else can just use the tool above.
API endpoint
Prefer to automate it? One authenticated POST creates the task; the result comes back by webhook or a signed link. The same capability also runs here on the web, by email and from Telegram — and soon from our app too.
Call it from your stack
curl -X POST https://api.kit.forhosting.com/enc/binary-text \
-H "Authorization: Bearer $KIT_KEY" \
-H "Content-Type: application/json" \
-d '{"text":"Hi"}'const res = await fetch("https://api.kit.forhosting.com/enc/binary-text", {
method: "POST",
headers: {
"Authorization": `Bearer ${process.env.KIT_KEY}`,
"Content-Type": "application/json"
},
body: JSON.stringify({
"text": "Hi"
})
});
const { task_id } = await res.json();import os, requests
res = requests.post(
"https://api.kit.forhosting.com/enc/binary-text",
headers={"Authorization": f"Bearer {os.environ['KIT_KEY']}"},
json={
"text": "Hi"
},
)
task_id = res.json()["task_id"]<?php
$res = file_get_contents("https://api.kit.forhosting.com/enc/binary-text", false, stream_context_create([
"http" => [
"method" => "POST",
"header" => "Authorization: Bearer " . getenv("KIT_KEY") . "\r\nContent-Type: application/json",
"content" => '{"text":"Hi"}',
],
]));
$task = json_decode($res, true);body := bytes.NewBufferString(`{"text":"Hi"}`)
req, _ := http.NewRequest("POST", "https://api.kit.forhosting.com/enc/binary-text", body)
req.Header.Set("Authorization", "Bearer "+os.Getenv("KIT_KEY"))
req.Header.Set("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)Example request
{
"text": "Hi"
}Example response
{
"task_id": "tsk_a1b2c3d4e5f6a1b2c3d4e5f6",
"type": "enc.binary_text",
"status": "queued",
"_links": {
"result": "/tasks/tsk_…/result"
}
}The API is asynchronous: the call returns a task_id immediately and the result arrives by webhook. Polling is capped at 1 req/s per task.
Pricing
Published price — no tokens, no invented credits. A failed task is never charged.
Limits
max_chars | 100000 |
Errors
| HTTP | Code | Meaning |
|---|---|---|
401 | unauthorized | Missing or invalid API key. |
402 | insufficient_balance | Your balance doesn't cover the task price. |
404 | unknown_type | That task type doesn't exist. |
429 | rate_limited | Too many requests. Use the webhook instead of polling. |
Technical notes
Every bit group must be exactly eight digits; a short or long group, or a continuous string whose length is not a multiple of eight, returns a clear invalid_input error instead of inventing padding.
How text becomes 8-bit binary and why group length matters
Silent zero-padding or truncation would change the payload and hide worksheet mistakes. This landing targets people searching for a text to binary converter, binary to text tool, or eight-bit ASCII and UTF-8 encoder online; it is not a floating-point IEEE bit viewer and not a hex-to-binary digit mapper.
How to call the API and what the response contains
The default mode is encode: the UTF-8 bytes of text become space-separated eight-bit binary groups. Mode decode treats text as binary groups—whitespace-separated octets or a continuous zero-one string whose length is a multiple of eight—and returns the recovered UTF-8 string. On success for decode, the response includes mode, input, result and text with the decoded UTF-8 string, binary normalized to space-separated groups, the same groups and bytes arrays, counts, and a matching message. Send a JSON body with a required string field text (aliases input, value, and data) and an optional mode that is either encode or decode. Input length is capped at one hundred thousand characters so a single request cannot exhaust Worker memory on huge strings. On success for encode, the response includes mode, input, result and binary with the same space-separated bit string, groups as an array of eight-character strings, bytes as the integer byte values, byte_count and bit_count, and a short English message. Failed validation—missing text, non-string text, oversize input, an unknown mode, a bit group that is not eight digits, non-binary characters inside a group, or decoded bytes that are not valid UTF-8—returns invalid_input and is never charged. Pricing is a flat $0.002 per successful request with unit item and zero marginal unit price.
Practical tips, limits, and related tools
Prefer decode when you already hold bit strings from a textbook or a packet dump and want the characters back. Round-trip checks are the fastest smoke test: encode a short word such as Hi, confirm the two groups match the known ASCII bytes for H and i, then decode those groups and confirm you recover the original string. Prefer this capability when the search intent is text characters versus eight-bit binary groups; use a hex-to-binary formatter when the input is already hexadecimal digits, and use a float bit viewer when you need sign, exponent, and mantissa fields. When teaching, show the same emoji or accented letter next to a plain ASCII letter so students see multi-byte UTF-8 octets appear as extra eight-bit groups rather than a single mystery code. Deliberately submit a seven-bit fragment or a continuous binary string whose length is not a multiple of eight to assert that your client handles invalid_input and the error message that states each group must be eight digits. Keep payloads under the published character limit; multi-megabyte dumps belong offline. This tool is not a hex converter—hex digits are base sixteen, not base two—and it is not an IEEE-754 float bit inspector. Failed tasks that return invalid_input do not consume prepaid balance, which keeps exploratory scripts cheap when learners paste incomplete bit groups.
Integration use cases
Unit-test fixtures for codecs and parsers
Generate known binary strings from fixture text and assert decode recovers the same UTF-8 bytes in CI without ad-hoc bit packing helpers.
Technical questions
Why must each bit group be eight digits?
A byte is eight bits. Groups with another length would be ambiguous without padding rules, so incomplete or overlong groups return invalid_input.