Text to Binary, Hex and Decimal
Convert text to binary, hexadecimal, decimal or octal bytes, or decode them back to text. UTF-8 aware, so emoji and accents work.
Convert text to binary, hexadecimal, decimal or octal bytes, or decode them back to text. UTF-8 aware, so emoji and accents work.
Computers store text as bytes. This tool shows those bytes in binary, hexadecimal, decimal or octal, and turns them back into text.
It works on UTF-8 bytes, so characters outside basic ASCII, such as accented letters, symbols and emoji, are encoded correctly.
Hi -> 01001000 01101001
Text is stored as numbers, and the encoding defines which number stands for which character. ASCII uses seven bits for 128 characters, so the letter A is 65, which is 01000001 in binary and 41 in hex. Unicode assigns a code point to every character, and UTF-8, the dominant web encoding, stores code points in one to four bytes. ASCII characters keep their single byte form, which is why plain English text looks identical in ASCII and UTF-8. Characters beyond that, such as the accented e, use two bytes beginning with the bit pattern 110.
Each representation is just another way of writing the same bytes. Eight binary digits, two hex digits, or a decimal number from 0 to 255 describe one byte, and octal needs up to three digits. Hex is the most compact and common in debugging, while binary shows individual bits. When decoding, the bytes must form valid UTF-8, otherwise characters turn into replacement symbols or decoding fails. Multi-byte characters must stay together, so cutting a byte sequence in the middle of an emoji will corrupt it. Leading zeros matter in binary groups, since they preserve the eight bit width.
In UTF-8, characters outside basic ASCII use two to four bytes. For example the euro sign takes three.
Paste the bytes, choose the matching format and separator, and click Decode.
A value is not valid for the chosen format, is larger than 255, or the bytes are not valid UTF-8 text.
No. It is converted in your browser.
Most emoji need four bytes. Some, such as flags or family emoji, combine several code points and so can take many bytes, because they are sequences joined together.
No. Binary, hex and decimal are plain representations anyone can reverse. They offer no secrecy, so do not use them to protect sensitive information.