User Rating 0.0 β˜…β˜…β˜…β˜…β˜…
Total Usage 0 times
Is this tool helpful?

Your feedback helps us improve.

β˜… β˜… β˜… β˜… β˜…

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.

ascii bytes hex binary octal character encoding converter text to bytes

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:

bi = charCodeAt(S, i)

The base conversions use standard positional notation. For a decimal byte value b:

Hexadecimal: b16 = b .toString(16)
Octal: b8 = b .toString(8)
Binary: b2 = b .toString(2)

Reverse conversion parses each token from the byte string back into a decimal integer, then maps it to a character:

ci = fromCharCode(parseInt(token, radix))

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

CharDecHexOctBinaryDescription
NUL00000000000000Null
SOH10100100000001Start of Heading
STX20200200000010Start of Text
ETX30300300000011End of Text
LF100A01200001010Line Feed
CR130D01500001101Carriage Return
SP322004000100000Space
!332104100100001Exclamation Mark
0483006000110000Digit Zero
9573907100111001Digit Nine
A654110101000001Uppercase A
Z905A13201011010Uppercase Z
a976114101100001Lowercase a
z1227A17201111010Lowercase z
~1267E17601111110Tilde
DEL1277F17701111111Delete
Γ€192C030011000000Latin A with Grave
Γ©233E935111101001Latin e with Acute
ΓΌ252FC37411111100Latin u with Diaeresis
ΓΏ255FF37711111111Latin y with Diaeresis

Frequently Asked Questions

Standard ASCII defines code points 0 - 127. Characters in the 128 - 255 range fall under extended ASCII (ISO 8859-1 / Latin-1) and are converted normally. Characters above code point 255 (such as emoji or CJK ideographs) are flagged with a warning. The tool reports their Unicode code point value, but this does not equal the multi-byte UTF-8 encoding. For example, the character "€" has code point 8364 (0x20AC), but its UTF-8 representation is the 3-byte sequence 0xE2 0x82 0xAC.
When converting bytes back to text, each token is parsed using parseInt with the appropriate radix. If a token cannot be parsed (e.g., "GG" in hexadecimal mode or "256" in decimal mode for strict ASCII), it is replaced with the Unicode replacement character U+FFFD (οΏ½) and a toast notification reports the invalid token. Always verify your delimiter matches the one used during the original conversion.
Byte-level data is conventionally represented with fixed-width fields. Binary uses 8 bits (one octet), hexadecimal uses 2 digits, and octal uses 3 digits. This zero-padding preserves byte boundaries and prevents ambiguity when concatenating values. For example, without padding, the sequence "1 10" could mean code points 1 and 10, or a single malformed token. Padding to "001 010" removes that ambiguity.
Space is the most common delimiter for human readability and is the default in hex editors. Comma-separated values integrate well with CSV workflows and array literals. The "0x" prefix format (e.g., 0x48 0x65) is standard in C/C++/Java source code. No delimiter produces a continuous hex stream used in checksums, hashes, and binary protocol dumps. Choose based on your downstream consumer.
Yes. All control characters (code points 0 - 31 and 127) are converted to their byte values. In the character breakdown table, they are displayed using their standard abbreviations (e.g., NUL, LF, CR, TAB, ESC). When converting bytes back to ASCII, these control characters are inserted literally into the output text, which means they will affect formatting (newlines will break lines, tabs will add whitespace).
This tool is suitable for inspecting single-byte character payloads such as HTTP headers, SMTP commands, or FTP responses which are defined in ASCII. Set the format to hexadecimal with space delimiter to match Wireshark-style output. For binary protocols carrying raw byte data (not character data), paste the hex dump into the bytes-to-ASCII panel. Limitation: this tool does not perform UTF-8 multi-byte decoding, so payloads containing multi-byte characters require a dedicated UTF-8 decoder.