Text to Binary Converter

Convert text to binary, hex, octal, decimal bytes, Base32 or Base85 (Ascii85 and Z85), and back again, in UTF-8, UTF-16 or Latin-1, with every byte shown.

Converter Text & Encoding Updated Oct 3, 2026
How to Use
  1. Choose Encode (text to code) or Decode (code back to text), then pick the format: binary, hex, octal, decimal, Base32 or Base85.
  2. Type or paste. The result updates as you type, and the byte table shows how every character became bytes.
  3. Set the separator and letter case, the Base32 or Base85 variant, and the character encoding (UTF-8 unless you know otherwise).
  4. Decoding is forgiving: 0x and \x prefixes, colons, commas and line breaks are all accepted, and any bad group is pointed out.
Input
Presets
Bytes
Characters
—
Bytes
—
Binary length
—
Per byte
—

Worked Example

Encode Hi in UTF-8. H is character 72 and i is 105, one byte each.

Binary: 72 = 64 + 8 = 01001000, 105 = 64 + 32 + 8 + 1 = 01101001.
Hex: 72 = 4 × 16 + 8 = 48, 105 = 6 × 16 + 9 = 69.
Base32: the 16 bits 01001000 01101001 are regrouped into fives: 01001 00001 10100 1, and the last group is filled out with zeros to 10000. Those are 9, 1, 20 and 16, which are J, B, U and Q in the alphabet A=0 … Z=25, 2=26 … 7=31. Base32 works in blocks of 8 characters, so four = signs pad it: JBUQ====.

Show Work

Type something above to see how the first characters become bytes.

Formulas

One byte
8 bits = 2 hex = 3 octal digits
0–255 decimal
UTF-8 length
1 · 2 · 3 · 4 bytes
U+0000–7F · to 7FF · to FFFF · above
Base32 length
8 × ⌈n / 5⌉ characters
5 bytes → 8 characters (+60%)
Base85 group
4 bytes → 5 digits base 85
855 = 4,437,053,125 > 232 (+25%)
Ascii85 character
digit + 33
! to u; z = four zero bytes

Bits, Bytes and Printable Text

Computers store text as numbers. ASCII (1963) gave the 128 basic English characters the numbers 0–127, and the 8-bit byte, standard since IBM’s System/360 in 1964, held one character each. UTF-8, designed by Ken Thompson and Rob Pike in 1992, kept those same single bytes for ASCII and added 2–4 byte sequences for the rest of Unicode, which is why plain English text looks identical in ASCII and UTF-8.

Binary data cannot always travel through systems built for text, so encodings such as Base64, Base32 and Base85 rewrite bytes as printable characters. Ascii85 appeared in the btoa tool and in Adobe’s PostScript and PDF, Z85 was published by the ZeroMQ project in 2013 to be safe inside source code, and Base32 was standardised with Base64 in RFC 4648 (2006).

About This Tool

This tool converts text to binary, hex, octal and decimal bytes, Base32 (RFC 4648 and base32hex) and Base85 (Ascii85 and Z85), and back, in UTF-8, UTF-16 or Latin-1. The byte table shows exactly which bytes each character became, so multi-byte characters stand out.

The decoder accepts the usual prefixes and separators and reports the first group it cannot read. Everything runs in your browser.

Related tools: Base64 Encoder / Decoder, Base58 / Base62 Encoder, and Unicode Escape.

Frequently Asked Questions

How is text turned into binary?

Each character is first turned into bytes by a character encoding, and each byte is written as 8 binary digits. In UTF-8, plain English letters are one byte each: H is 72, which is 01001000. Accented letters take 2 bytes, most Chinese and Japanese characters 3 and emoji 4, so “é” is 11000011 10101001.

Why does the same text give different results on different sites?

Usually the character encoding. UTF-8 is the standard on the web, but some tools use UTF-16 (2 or 4 bytes per character, as Windows and JavaScript store text) or Latin-1 (1 byte, only 256 characters). “é” is C3 A9 in UTF-8, E9 00 in UTF-16 LE and E9 in Latin-1. Choose the encoding here to match.

What are Base32 and Base85 for?

Like Base64, they write any bytes using only safe printable characters. Base32 (RFC 4648) uses A–Z and 2–7, so it survives case changes and is easy to read aloud; it is used for 2FA secret keys and onion addresses, and makes data 60% bigger. Base85 packs 4 bytes into 5 characters, only 25% bigger: Ascii85 is used inside PDF and PostScript files, and Z85 by the ZeroMQ messaging library.

Why does decoding say “not a multiple of 8”?

Binary with no spaces is read 8 digits at a time, so the number of digits must divide by 8. A missing or extra digit shifts every following byte and garbles the rest of the text. Put spaces between bytes, or check for a dropped digit near where the text goes wrong.

What is the difference between hex and Base16?

Nothing: hexadecimal is Base16, two digits per byte. RFC 4648 writes it in capitals with no spaces (48 69 becomes 4869), which you can get here by choosing no separator and capitals.

How do I use the Text to Binary Converter?

Simply type or paste your value and read the result, which refreshes the instant you change something. There is nothing to submit and nothing to wait for.

Do I need to install or sign up for anything?

Not at all — it runs in the browser with nothing to install and no account. After it loads once, it even works without an internet connection.

Is my information private?

Yes. Everything happens in your browser. Nothing you type is sent to a server or saved anywhere.

Common Use Cases

Homework and puzzles

Turn a name into binary for a bracelet or a class exercise: CAT is 01000011 01000001 01010100.

Debugging encodings

See why “café” is 5 bytes in UTF-8 but 4 in Latin-1, and spot mojibake by its telltale C3 bytes.

2FA and Base32 keys

Decode a Base32 authenticator secret to hex, or check that a 16-character key really holds 10 bytes.

PDF and ZeroMQ data

Decode an Ascii85 stream between <~ and ~> from a PDF, or a Z85 key from a ZeroMQ CURVE configuration.

Last updated: