User Rating 0.0 โ˜…โ˜…โ˜…โ˜…โ˜…
Total Usage 0 times
0 / 10,000
Paste space-separated values
2–36
Result

    
  
Is this tool helpful?

Your feedback helps us improve.

โ˜… โ˜… โ˜… โ˜… โ˜…

About

Every character in a text string maps to a numeric code point defined by the ASCII standard (American Standard Code for Information Interchange, ANSI X3.4-1986). That code point is a base-10 integer, but hardware, protocols, and file formats frequently require the value expressed in base-2, base-8, or base-16. Getting the radix wrong in a network packet header or a memory dump causes silent data corruption. This tool converts each character's code point into any radix from 2 to 36, applying consistent zero-padding so every token occupies the same width. It handles the full byte range 0 - 255 (extended ASCII / Latin-1). Note: characters above code point 127 fall outside strict 7-bit ASCII and follow ISO 8859-1 mapping.

ascii converter base converter text to binary text to hex ascii to octal character encoding number base radix converter

Formulas

The conversion from a text character to its representation in base b follows two steps. First, extract the character's code point. Then, express that integer in the target radix by repeated division.

c = charCodeAt(char)

The code point c is then converted to base b using the standard positional decomposition:

c = nโˆ‘i=0 di โ‹… bi

where each digit di is the remainder of successive division:

di = c mod b , c โ† โŒŠcbโŒ‹

Digits are collected least-significant first, then reversed. For remainders โ‰ฅ 10, the standard convention maps 10 โ†’ A, 11 โ†’ B, โ€ฆ 35 โ†’ Z.

Padding width w for a full byte is: w = โŒˆ8log2(b)โŒ‰. For base 2: w = 8. For base 8: w = 3. For base 16: w = 2.

Where c = code point (integer), b = target base/radix (2 - 36), di = digit at position i, w = zero-pad width.

Reference Data

CharDecHexOctBinaryDescription
NUL00000000000000Null
TAB90901100001001Horizontal Tab
LF100A01200001010Line Feed
CR130D01500001101Carriage Return
SP322004000100000Space
!332104100100001Exclamation Mark
0483006000110000Digit Zero
9573907100111001Digit Nine
A654110101000001Latin Capital A
Z905A13201011010Latin Capital Z
a976114101100001Latin Small a
z1227A17201111010Latin Small z
~1267E17601111110Tilde
DEL1277F17701111111Delete
ยฃ163A324310100011Pound Sign (ISO 8859-1)
ยฉ169A925110101001Copyright Sign
ยฐ176B026010110000Degree Sign
ยต181B526510110101Micro Sign
โ‚ฌ836420AC2025410000010101100Euro Sign (Unicode)

Frequently Asked Questions

Strict ASCII covers code points 0 - 127 (7-bit). This tool uses JavaScript's charCodeAt, which returns the UTF-16 code unit. For Latin-1 characters (128-255), the values match ISO 8859-1. For characters like the Euro sign (โ‚ฌ, code point 8364), the converter produces a correct base-b representation of that larger integer, but the result exceeds a single byte. The output label will flag any code points above 255.
Without padding, the letter "A" (code point 65) renders as 1000001 in binary - 7 digits. Protocols and memory layouts expect 8-bit octets: 01000001. Inconsistent widths cause alignment errors when parsing concatenated streams. Hex similarly expects 2 digits per byte. This tool pads based on the formula w = โŒˆ8 รท log2(b)โŒ‰.
Base 2 (binary) for hardware registers, bit masks, and network protocol fields. Base 8 (octal) for Unix file permissions (e.g., 755). Base 10 (decimal) for human-readable code point tables. Base 16 (hexadecimal) for memory addresses, color codes, and byte-level inspection. Base 36 is used for compact URL-safe identifiers (digits 0 - 9 plus letters A - Z).
Control characters (code points 0 - 31 and 127) are valid ASCII. They are converted normally. In the output, they are represented by their numeric value in the target base. The character breakdown table labels them with standard abbreviations (TAB, LF, CR, NUL) so you can identify non-printable characters in your input.
Yes. The tool includes a reverse mode. Paste the base-encoded values (space-separated), select the same base, and convert back to text. The parser splits on the chosen separator, interprets each token as an integer in the specified radix via parseInt(token, b), and maps each integer back to a character with String.fromCharCode. If any token produces NaN, the tool flags it as an invalid token rather than silently dropping it.
The tool accepts up to 10,000 characters. Beyond that, the DOM rendering of potentially 80,000 binary digits can degrade scroll performance. For bulk conversion of files, a command-line tool like xxd or od is more appropriate. This limit is a deliberate trade-off between browser responsiveness and utility.