User Rating 0.0
Total Usage 0 times
Input 0 chars
Output
Is this tool helpful?

Your feedback helps us improve.

About

Character encoding errors account for a significant share of data corruption in file transfers, serial communication, and legacy system integrations. This converter maps each character to its numeric code point and renders it in binary (base-2), hexadecimal (base-16), octal (base-8), or decimal (base-10) representation. Standard ASCII uses 7 bits per character, covering code points 0 - 127. Extended ASCII and UTF-8 use 8 bits or multi-byte sequences per RFC 3629. The tool performs bidirectional conversion: paste text to get binary, or paste binary to recover the original string.

Misidentifying encoding (e.g., treating UTF-8 multi-byte as ISO-8859-1) produces garbled output known as mojibake. This tool validates every input group against the selected encoding constraints before conversion. It approximates behavior for printable ASCII; control characters (code points < 32) are converted but may not render visibly. Pro tip: when debugging serial protocols, use the space delimiter and compare byte-by-byte against your device specification sheet.

ascii to binary binary converter text to binary binary to text ascii converter character encoding binary code

Formulas

Each character is mapped to its Unicode code point, then converted to the target base. The fundamental conversion for a single character c to binary proceeds as follows:

B = pad(toString(charCodeAt(c), 2), 8)

Where charCodeAt(c) returns the decimal code point of character c, toString(n, 2) converts integer n to base-2 string, and pad left-pads with zeros to 8 bits. For the reverse direction:

c = fromCharCode(parseInt(B, 2))

For UTF-8 multi-byte characters (code points > 127), the encoder applies the RFC 3629 scheme:

{
0xxxxxxx if cp 007Fh (1 byte)110xxxxx 10xxxxxx if cp 07FFh (2 bytes)1110xxxx 10xxxxxx 10xxxxxx if cp FFFFh (3 bytes)11110xxx 10xxxxxx 10xxxxxx 10xxxxxx if cp 10FFFFh (4 bytes)

Where cp is the Unicode code point and x bits are filled from the code point value. The conversion to hexadecimal uses base 16 with digits 0 - 9 and A - F, padded to 2 characters. Octal uses base 8, padded to 3 characters.

Reference Data

CharacterDecimalHexOctalBinary (8-bit)Description
NUL00000000000000Null
SP322004000100000Space
!332104100100001Exclamation mark
0483006000110000Digit zero
9573907100111001Digit nine
A654110101000001Uppercase A
Z905A13201011010Uppercase Z
a976114101100001Lowercase a
z1227A17201111010Lowercase z
@644010001000000At sign
#352304300100011Hash / Number sign
+432B05300101011Plus sign
=613D07500111101Equals sign
/472F05700101111Forward slash
\925C13401011100Backslash
{1237B17301111011Left curly brace
}1257D17501111101Right curly brace
[915B13301011011Left square bracket
]935D13501011101Right square bracket
~1267E17601111110Tilde
DEL1277F17701111111Delete
LF100A01200001010Line feed
CR130D01500001101Carriage return
TAB90901100001001Horizontal tab
ESC271B03300011011Escape

Frequently Asked Questions

Standard ASCII defines 128 characters using code points 0 - 127, requiring only 7 bits per character. The 8th bit is traditionally a parity bit. Extended ASCII (ISO 8859-1, Windows-1252) uses the full 8 bits to represent 256 characters, adding accented letters and symbols in positions 128 - 255. This converter defaults to 8-bit representation for consistency. When working with strict 7-bit systems (some legacy serial protocols), verify that all input characters fall within the 0 - 127 range.
Control characters (code points 0 - 31 and 127) are valid ASCII and are converted to their binary equivalents. For example, a line feed (LF, code point 10) becomes 00001010 and a carriage return (CR, code point 13) becomes 00001101. These characters will not render visibly in the character breakdown table but their binary representations are correct. When converting binary back to text, the decoded control characters will be inserted into the output string and may affect formatting.
Characters outside the ASCII range (code points above 127) require multi-byte encoding under UTF-8. A character like € (U+20AC) encodes to 3 bytes (24 bits): 11100010 10000000 10101100. Emoji can require 4 bytes (32 bits). Switch the encoding mode to UTF-8 to handle these correctly. In ASCII-only mode, the converter will flag any character with a code point above 127 as out of range.
The converter must know where one byte ends and the next begins. Without delimiters, a string like 0100000101000010 is ambiguous unless you enforce fixed 8-bit grouping. Using a space delimiter (01000001 01000010) is the most common convention. This tool supports space, comma, dash, pipe, and no-delimiter modes. When using no delimiter, the total bit count must be divisible by 8 (or 7 in strict ASCII mode), otherwise the conversion will fail with a validation error.
Yes. Enter text to produce binary, then paste that binary output back in reverse mode to recover the original text. If the round-trip produces identical output, the conversion is lossless. Data integrity issues arise when: (1) non-binary characters appear in the input during binary-to-text mode, (2) bit groups are not properly delimited, or (3) a code point falls outside the selected encoding range. The converter validates each group and reports specific error positions.
The converter accepts up to 100,000 characters of input. Conversion is an O(n) operation, where n is the character count. For 100,000 characters, the output binary string (with space delimiters) will be approximately 900,000 characters. Performance remains under 50ms on modern hardware for this size. For extremely large payloads, consider splitting the input into chunks.