ASCII to Bytes Converter
Convert ASCII text to bytes in decimal, hexadecimal, octal, or binary format. Reverse bytes-to-ASCII conversion supported.
About
Every character transmitted across a network or stored on disk reduces to a numeric byte value defined by the ASCII standard (ANSI X3.4-1986). A single misinterpreted encoding - confusing CR LF (0x0D 0x0A) with LF (0x0A) - can corrupt file parsing, break protocol handshakes, or produce garbled output in legacy systems. This tool converts each input character to its byte representation in decimal, hexadecimal, octal, or binary, and performs the reverse operation. It handles standard ASCII (0 - 127) and extended ASCII (128 - 255). Characters outside the single-byte range are flagged. The tool assumes one byte per character under the ISO 8859-1 / Latin-1 mapping. For multi-byte encodings such as UTF-8, a single character may occupy 1 - 4 bytes; this converter reports the Unicode code point value, not the UTF-8 byte sequence.
Formulas
The conversion from a character to its byte value is a direct lookup in the ASCII/Latin-1 code table. For a character c at position i in a string S, the byte value b is:
The base conversions use standard positional notation. For a decimal byte value b:
Reverse conversion parses each token from the byte string back into a decimal integer, then maps it to a character:
Where b is the numeric code point, S is the input string, i is the character index, radix is the target base (2, 8, 10, or 16), and token is one byte value in the chosen base representation.
Reference Data
| Char | Dec | Hex | Oct | Binary | Description |
|---|---|---|---|---|---|
| NUL | 0 | 00 | 000 | 00000000 | Null |
| SOH | 1 | 01 | 001 | 00000001 | Start of Heading |
| STX | 2 | 02 | 002 | 00000010 | Start of Text |
| ETX | 3 | 03 | 003 | 00000011 | End of Text |
| LF | 10 | 0A | 012 | 00001010 | Line Feed |
| CR | 13 | 0D | 015 | 00001101 | Carriage Return |
| SP | 32 | 20 | 040 | 00100000 | Space |
| ! | 33 | 21 | 041 | 00100001 | Exclamation Mark |
| 0 | 48 | 30 | 060 | 00110000 | Digit Zero |
| 9 | 57 | 39 | 071 | 00111001 | Digit Nine |
| A | 65 | 41 | 101 | 01000001 | Uppercase A |
| Z | 90 | 5A | 132 | 01011010 | Uppercase Z |
| a | 97 | 61 | 141 | 01100001 | Lowercase a |
| z | 122 | 7A | 172 | 01111010 | Lowercase z |
| ~ | 126 | 7E | 176 | 01111110 | Tilde |
| DEL | 127 | 7F | 177 | 01111111 | Delete |
| Γ | 192 | C0 | 300 | 11000000 | Latin A with Grave |
| Γ© | 233 | E9 | 351 | 11101001 | Latin e with Acute |
| ΓΌ | 252 | FC | 374 | 11111100 | Latin u with Diaeresis |
| ΓΏ | 255 | FF | 377 | 11111111 | Latin y with Diaeresis |