1
OneClickUse
Converters Tool

Text to Binary Converter

Convert readable text to binary bytes or binary back to text.

Privacy-first workflows
Fast and simple
100% Free, no signup

Written by Anil Gautam · Updated

How is text converted to binary?

Each character is replaced by its character code written in base 2 and padded to at least eight digits, with a space between characters. The eight places are worth 128, 64, 32, 16, 8, 4, 2 and 1. H is code 72, or 64 + 8, so it becomes 01001000; i is 105 (64 + 32 + 8 + 1) and becomes 01101001. "Hi" therefore converts to 01001000 01101001. Upper and lower case differ by a single bit, the one worth 32: A is 01000001 and a is 01100001. A space is 00100000.

For English letters, digits and common punctuation, these codes match ASCII and UTF-8 bytes, so the output agrees with textbook tables and other converters. Digits in the text are treated as characters: typing 5 gives 00110101, which is code 53. A new line in the box becomes 00001010, the line feed code 10.

Why do some characters give more than 8 bits?

Outside basic English, the codes come from JavaScript's UTF-16 encoding, which differs from UTF-8 bytes. The rupee sign ₹ is code 8377 and comes out as the 14-digit group 10000010111001, while UTF-8 stores it as three bytes: 11100010 10000010 10111001. For é the result is one group, 11101001, where UTF-8 uses two bytes, 11000011 10101001. Devanagari letters such as न produce 12-digit groups. Most emoji are stored as two UTF-16 units and only the first is converted, so decoding the result gives a broken character in place of the emoji.

How do I convert binary back to text?

Choose Binary to Text and paste groups separated by spaces or line breaks. Each group is read as one character code of any length, so 1000001 without its leading zero still gives A. Spacing matters: 0100100001101001 written as one block is read as a single number, 18537, and turns into one CJK character (U+4869) in place of "Hi".

A character other than 0 or 1 ends a group early, so 0110100x is read as 0110100, the digit 4. Groups that start with any other character become an invisible null character. Switching the mode keeps the text in the box and reads it the other way, so paste the binary you want to decode after switching. To turn the number 5 into 101, use the Base Converter, and for packing text into a copy-safe form, Base64 Encode/Decode.

How it works

How to convert text and binary

STEP 01
Paste text or binary bytes.
STEP 02
Choose text to binary or binary to text.
STEP 03
Copy the converted result.
You might also need

Related tools

Converters
URL Encode/Decode
Encode URLs for query strings or decode percent-encoded URL text.
Use now
Converters
JSON Formatter & Viewer Online
Format and validate JSON, explore a collapsible tree, search keys and values, compare structures, and export conversions. Your JSON stays in your browser.
Use now
Converters
CSV to JSON
Convert simple CSV rows into JSON objects using the first row as headers.
Use now
Converters
JSON to CSV
Convert an array of JSON objects into CSV rows with headers.
Use now
Converters
RGB to HEX Converter
Convert HEX colors to RGB or RGB colors back to HEX.
Use now
Converters
Unix Timestamp Converter
Convert Unix timestamps to readable dates and dates back to Unix time.
Use now
FAQ

Common questions