←
Developer

Text to Binary

Loading the tool…

Ready when you are.Runs in this browser · nothing is uploaded

Text as bytes: binary, hex, Base32…

  • Free
  • No sign-up
  • No upload
  • Works offline

Tool facts

Price
Free, no sign-up, no watermark
Are files uploaded?
No. Everything is processed in this browser, on your device.
Offline use
Works without a connection once this page has loaded
Browser
A recent Chrome, Edge, Firefox or Safari, on computer or phone.
Limits
Text larger than 2 MB once encoded is refused; Base58 is skipped above 256 KB.

Check it yourself: press F12, open the Network tab, then use the tool. No request carries your data.

About Text to Binary

Text to Binary turns a piece of text into its bytes and shows those bytes in nine notations at the same time: 8-bit binary, octal, decimal, hex, Base32 and Base32hex (RFC 4648), Crockford Base32, Base58 with the Bitcoin alphabet, and Ascii85. You choose how characters become bytes: UTF-8, UTF-16LE, UTF-16BE or Latin-1. A table under the result lists every code point with its U+ number and its bytes, so you can see why "Hi" is 2 bytes in UTF-8 while 你 is 3 and 👩‍💻 is 11.

Decode works the other way: paste binary, hex (with or without 0x, \x or %), decimal bytes or one of the Base32, Base58 or Ascii85 forms, and the tool guesses the format, shown as a highlighted chip you can change. If the bytes are not valid in the chosen charset you get the byte offset and a hex dump instead of garbled characters. Base64 is not here; it has its own tool. Numbers between bases belong in the Number Base Converter. Everything runs in your browser.

Text to Binary runs entirely in your browser. Your data is processed on your device and is never uploaded to Qiyi or anyone else.

How to use Text to Binary

  1. Choose Encode and type or paste your text into the Input box.
  2. Pick the Charset: UTF-8 for most uses, UTF-16LE or UTF-16BE for Windows and Java strings, Latin-1 for single-byte legacy data.
  3. Set Separator, Prefix and Uppercase hex if you need a particular layout, for example 0x with commas for a C array.
  4. Click Copy next to the row you need, and check the Per character breakdown table to see which bytes each character produced.
  5. To go back, choose Decode, paste the encoded text and read the result; click another format chip if the guess is wrong.

Frequently asked questions

Why does one character give more than one byte?

Text is stored as code points, and the charset decides how many bytes each code point needs. In UTF-8, ASCII letters take 1 byte, most accented letters 2, Chinese and Japanese characters 3, and emoji 4. In UTF-16 every character takes 2 bytes, or 4 for code points above U+FFFF. Emoji such as 👩‍💻 are several code points joined by an invisible zero width joiner (U+200D); the breakdown table groups them under one row so you can see each part.

Which Base32, Base58 and Ascii85 variants does it use?

Base32 and Base32hex follow RFC 4648 with = padding, the same output as Python's base64.b32encode and b32hexencode. Crockford Base32 uses 0–9 and A–Z without I, L, O and U, no padding and no check symbol; when decoding, I and L are read as 1, O as 0 and hyphens are ignored. Base58 uses the Bitcoin alphabet, and each leading zero byte becomes a 1. Ascii85 matches Python's a85encode: z stands for four zero bytes, and <~ ~> is only added if you turn it on.

How does decode know which format I pasted?

It tries the formats in a fixed order: binary (only 0 and 1 in groups of 7 or 8 bits), hex (an even number of digits, prefixes allowed), octal, decimal bytes from 0 to 255, then Base32, Base32hex, Crockford, Base58 and Ascii85. The first one that decodes to readable text in your charset wins. Formats that cannot decode the input are greyed out, and hovering one shows why.

What happens with characters Latin-1 cannot store?

Latin-1 (ISO-8859-1) has only 256 characters, U+0000 to U+00FF. If your text contains anything else, such as € or 你, no bytes are produced; the tool names the first such character and its position, and marks it in the breakdown table. When decoding, every byte is a valid Latin-1 character, so Latin-1 never fails, while UTF-8 and UTF-16 report the offset of the first invalid byte.

Is there a size limit?

Text up to 2 MB after encoding is converted; larger input is refused. Each result shows at most 200,000 characters on the page with a note, but Copy copies the full value. Base58 needs big-number division, so it is skipped above 256 KB of input. The breakdown table lists the first 200 code points. Nothing is uploaded.

· Free · Runs in this browser · nothing is uploaded

Drop any file here
Drop it to see which tools can open it