Text to Binary, Hex and ASCII Converter
Turn text into its binary, hexadecimal or decimal byte codes and decode such codes back into text. Uses ASCII for English characters and UTF-8 for everything else, so accented letters, symbols and emoji round-trip correctly.
Last updated: October 2026
Binary
01001000 01100101 01101100 01101100 01101111
Formula below · 3 sources (rfc-editor.org, w3.org, unicode.org) · Updated Oct 2026
Compare with similar
About this calculator
Computers store text as numbers. ASCII (RFC 20) assigns each English letter, digit and punctuation mark a code from 0 to 127: A is 65, a is 97, 0 is 48 and a space is 32. Each code fits in one byte, so the word Hi is the two bytes 72 and 105, or 01001000 01101001 in binary and 48 69 in hex.
Characters outside ASCII (é, €, Chinese characters, emoji) are encoded with UTF-8 (RFC 3629), which keeps the ASCII codes unchanged and uses two to four bytes for everything else. This converter encodes with UTF-8, so é becomes C3 A9 (two bytes) and € becomes E2 82 AC (three). Decoding reverses the process: the bytes are grouped back into characters, and a sequence that is not valid UTF-8 is reported instead of producing garbage.
Each byte is shown as 8 binary digits, 2 hexadecimal digits or a decimal number from 0 to 255, separated by spaces. When decoding, spaces and commas are optional: 0100100001101001 and 01001000 01101001 both decode to Hi, as long as the total number of bits is a multiple of 8. Hex may be written with or without 0x prefixes and in either case. Decimal codes above 255 are rejected because a byte cannot hold them; a Unicode code point above 255 (such as 8364 for €) must first be UTF-8 encoded, which the text-to-decimal direction does for you.
How to use
Example (the defaults): Hello to binary. The ASCII codes are H = 72, e = 101, l = 108, l = 108, o = 111. In 8-bit binary: 72 = 01001000, 101 = 01100101, 108 = 01101100, 111 = 01101111, so Hello = 01001000 01100101 01101100 01101100 01101111. Binary to text: choose Binary → text and paste 01001000 01101001. 01001000 = 72 = H and 01101001 = 105 = i, so the result is Hi. Text to hex: Hello becomes 48 65 6C 6C 6F, the same five bytes written in base 16 (72 = 4×16 + 8 = 0x48). Hex to text: 43 61 66 C3 A9 decodes to Café, where C3 A9 is the two-byte UTF-8 encoding of é.
Frequently asked questions
What is the difference between ASCII and UTF-8?
ASCII is a 7-bit code for 128 characters: the English alphabet, digits, punctuation and control codes such as newline (10). UTF-8 is an encoding of the much larger Unicode set that is backwards compatible with ASCII: every ASCII character keeps its one-byte code, and other characters use 2, 3 or 4 bytes whose first bits mark how long the sequence is. For plain English text the two are byte-for-byte identical, which is why this converter gives the familiar ASCII values for letters and only differs for accented or non-Latin characters.
Why does each character take 8 bits?
A byte is 8 bits and is the smallest unit of storage that computers address. ASCII only needs 7 bits (codes up to 127), so the leading bit of an ASCII byte is always 0, which is why every group in the binary output of English text starts with 0. UTF-8 uses that spare bit: bytes starting with 1 belong to multi-byte sequences for non-ASCII characters.
How do I convert binary to text by hand?
Split the bits into groups of 8 from the left, convert each group to decimal (multiply the bits by 128, 64, 32, 16, 8, 4, 2, 1 and add), then look up each number in an ASCII table. 01000001 = 64 + 1 = 65 = A. Lowercase letters are the uppercase code plus 32, so 01100001 = 97 = a. Digits start at 48: 00110101 = 53 = the character 5.
The decoder says the bytes are not valid UTF-8. What does that mean?
A byte sequence such as C3 on its own or FF 41 does not follow the UTF-8 rules (a lead byte announces how many continuation bytes follow, and continuation bytes always start with the bits 10). This happens when a multi-byte character was cut in half, when the data was not text in the first place, or when it was encoded in a different character set such as Windows-1252 or Latin-1. For plain ASCII (every byte below 128) decoding always succeeds.
What about spaces, newlines and emoji?
A space is the byte 32 (00100000), a newline is 10 and a tab is 9, so they appear in the output like any other character. Most symbols are 3-byte UTF-8 sequences and emoji are 4 bytes: a red heart ❤ (U+2764) is E2 9D A4, while a face emoji is F0 9F 98 80 and similar. The converter counts bytes, not characters, so a single emoji produces four binary groups.
Related calculators
Sources & references
Think a result is wrong? Report a problem with this calculator.