Text to Binary & Hex Converter
Convert text to binary, hexadecimal, octal or decimal codes and back, with UTF-8, UTF-16 and code point modes.
| Char | Unicode code points | UTF-8 | Binary | Decimal |
|---|---|---|---|---|
| H | U+0048 | 48 | 01001000 | 72 |
| e | U+0065 | 65 | 01100101 | 101 |
| l | U+006C | 6C | 01101100 | 108 |
| l | U+006C | 6C | 01101100 | 108 |
| o | U+006F | 6F | 01101111 | 111 |
| , | U+002C | 2C | 00101100 | 44 |
| ␠ | U+0020 | 20 | 00100000 | 32 |
| 世 | U+4E16 | E4 B8 96 | 11100100 10111000 10010110 | 19990 |
| 界 | U+754C | E7 95 8C | 11100111 10010101 10001100 | 30028 |
About this tool
Computers store text as numbers. This converter shows those numbers: type a word and you see the bytes behind it in binary, hexadecimal, octal or decimal. Paste a row of 0s and 1s or hex pairs and it turns them back into readable text. Students use it to check homework on number systems, developers use it to inspect what a string really contains, and puzzle fans use it to decode binary messages.
Most online converters only handle plain ASCII. This one works with any language and with emoji, because it encodes text as UTF-8 by default, the encoding used by almost every web page. You can switch to UTF-16 code units (how JavaScript, Java and Windows store strings) or to Unicode code points (one number per character).
How to use Text to Binary & Hex Converter
- Choose a direction: "Text → Code" to encode, or "Code → Text" to decode.
- Pick the number format (binary, hex, octal or decimal) and the encoding. UTF-8 bytes is right for most cases.
- Type or paste your input. The result updates as you type; when decoding, the format is detected automatically and invalid groups are listed instead of silently dropped.
- Use Swap to send the result back as input, check the per-character table under the boxes, or open the ASCII table for a quick reference.
Examples
Text to binary
Hi
01001000 01101001
H is 72 and i is 105 in ASCII; each byte is written as 8 bits.
Hex to text
48 65 6C 6C 6F
Hello
A Chinese character in UTF-8
中
Hex: E4 B8 AD · Binary: 11100100 10111000 10101101
Characters outside ASCII take 2 to 4 bytes in UTF-8.
Bytes, code units and code points
A code point is the number Unicode assigns to a character: é is U+00E9 and 😀 is U+1F600. An encoding decides how that number is stored. UTF-8 uses one byte for ASCII and up to four for everything else, so é becomes C3 A9. UTF-16 uses 16-bit units, and characters beyond U+FFFF, such as most emoji, need two of them: 😀 is stored as D83D DE00, a so-called surrogate pair.
This is why the same text can give different binary output depending on the setting. If you are matching a value from a programming language, choose the encoding that language uses: UTF-8 for files, network data and most databases; UTF-16 for JavaScript string lengths and Windows APIs.
Reading binary and hex quickly
- One hex digit is exactly four bits, so a byte is always two hex digits: 0100 1000 = 4 8 = 0x48.
- In ASCII, uppercase letters start at 0x41 (A) and lowercase at 0x61 (a). The two differ only in one bit (0x20).
- Digits 0–9 are 0x30–0x39, so the byte for "7" is 0x37, not 7.
- Binary without spaces is cut into 8-bit groups automatically, and prefixes such as 0x, 0b or \x are ignored when decoding.
Frequently asked questions
Everything you need to know about this tool and data security.
Why does an emoji turn into four bytes?
Emoji have code points above U+FFFF. UTF-8 needs four bytes for those (😀 = F0 9F 98 80), and UTF-16 needs two 16-bit units. Some emoji are built from several code points joined together, so they produce even more bytes.
What happens if I decode bytes that are not valid UTF-8?
Invalid sequences are shown as the replacement character �, exactly as a browser would display them. Values that are not numbers in the chosen base, or bytes larger than 255, are skipped and listed under the result.
Is binary code a kind of encryption?
No. Binary and hex are just other ways of writing the same numbers, and anyone can turn them back into text. Use real encryption, such as AES, if the content must stay secret.
Is my text sent anywhere?
No. All conversion happens in your browser with JavaScript, so it also works offline once the page has loaded.
Is my data safe when using this tool?
Yes, 100% safe. This tool operates entirely inside your web browser using client-side JavaScript and WebAssembly. Your data never touches any external server.
Related Tools
Convert numbers between binary, octal, decimal, hexadecimal and any base from 2 to 36, with exact big-number support.
Inspect any character: code point, name, block, category and UTF-8/UTF-16 bytes, and find hidden zero-width or direction characters in text.
Encode text to Base64 or decode Base64 to UTF-8 text with instant live conversion.
Featured Projects tech-fun.net
Explore more AI & productivity tools
Nihongo GameBox
Master Japanese typing, Kana, and JLPT N5–N1 vocabulary through interactive retro arcade games.
ResumeGPT
Tailors CVs and cover letters to every job opportunity with a multi-agent LLM pipeline, job tracking, and scheduled discovery.
CollectMind
Turns your bookmarks into a searchable AI knowledge base — entirely on-device, powered by Chrome's built-in Gemini Nano.