Binary / Hex Encoder & Decoder
Convert text to binary, hexadecimal, octal, or ASCII codes — and back again.
0 characters
Quick Reference — ASCII printable characters
| Char | Binary | Hex | Dec | Oct |
|---|---|---|---|---|
| A | 01000001 | 41 | 65 | 101 |
| Z | 01011010 | 5A | 90 | 132 |
| a | 01100001 | 61 | 97 | 141 |
| z | 01111010 | 7A | 122 | 172 |
| 0 | 00110000 | 30 | 48 | 060 |
| 9 | 00111001 | 39 | 57 | 071 |
| SPC | 00100000 | 20 | 32 | 040 |
| ! | 00100001 | 21 | 33 | 041 |
| @ | 01000000 | 40 | 64 | 100 |
| # | 00100011 | 23 | 35 | 043 |
4 Formats
Binary (Base-2), Hexadecimal (Base-16), Octal (Base-8), and ASCII decimal codes.
Bidirectional
Encode text to any format, or decode back to readable text with one click.
Instant & Offline
Pure JavaScript — no server round-trip. Works offline after the page loads.
Frequently Asked Questions
How do I convert text to binary?↓
Each character is converted to its ASCII code, then that decimal number is written in binary (Base-2) as an 8-bit group. For example, 'A' is ASCII 65, which is 01000001 in binary. 'Hello' becomes: 01001000 01100101 01101100 01101100 01101111.
How do I convert binary to text?↓
Split the binary string into 8-bit groups (bytes), convert each byte from binary to a decimal number, then look up the ASCII character for that number. For example, 01001000 is 72 in decimal, which is the letter 'H'.
What is the difference between binary, hex, and octal?↓
These are different number bases used to represent the same values. Binary (Base-2) uses only 0 and 1. Hexadecimal (Base-16) uses digits 0–9 and letters A–F, representing each byte in two characters (e.g., 'A' = 41). Octal (Base-8) uses digits 0–7. All three can represent any text via ASCII codes.
What is ASCII?↓
ASCII (American Standard Code for Information Interchange) is a character encoding standard that assigns a number from 0 to 127 to each common letter, digit, and symbol. For example, 'A' is 65, 'a' is 97, '0' is 48, and space is 32. Extended ASCII and Unicode extend this to support additional characters.
Last updated: