Text to Binary and Binary to Text Converter
Convert text to binary or hex bytes and back.
Use via 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. Send JSON, get JSON back.
POST https://pithlab.com/api/v1/tools/text-to-binary
curl https://pithlab.com/api/v1/tools/text-to-binary \
-H "Authorization: Bearer $PITHLAB_KEY" \
-H "Content-Type: application/json" \
-d '{"input":"Hi!","direction":"encode","format":"binary"}'About the Text to Binary
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.
How to use the Text to Binary
- Choose Text → Bytes to encode, or Bytes → Text to decode.
- Pick binary (8-bit groups) or hexadecimal output.
- Type or paste your text or bytes. The result updates as you type.
- Press Swap to send the result back the other way, then copy it.
Examples
Input
Hi
Output
01001000 01101001
Input
café
Output
63 61 66 c3 a9
Input
01010000 01101001 01110100 01101000
Output
Pith
Frequently asked questions
Which encoding is used?
UTF-8, the encoding used by almost all web pages. Plain English letters take one byte each, matching ASCII, while accented letters take two bytes and most emoji take four.
What binary formats can I decode?
Groups of up to 8 bits separated by spaces or line breaks, such as 1001000 1101001, or one continuous string whose length is a multiple of 8. Hex can be separated by spaces, commas or colons and may use 0x prefixes.
Why does decoding say my bytes are not valid UTF-8?
Some byte sequences can't occur in UTF-8, for example the first byte of a multi-byte character without the bytes that should follow it. This usually means a group was lost or mistyped when copying.