Text to Base Converter

Encode any text into binary, octal, decimal and hexadecimal at once.

Text to Base Converter

This tool effectively encode your text into binary, octal, decimal and hexadecimal.
Converting your text to binary, octal, Decimal and Hexadecimal had never been so easier before!


Load an example

Binary (base 2)
Copy
Octal (base 8)
Copy
Decimal (base 10)
Copy
Hexadecimal (base 16)
Copy
Settings
Pad each byte with leading zeros
Space between each byte
Add 0b, 0o, 0x before each code
Ready to convert text to base codes.


Overview

The Text to Base Converter turns any string of text into its binary, octal, decimal and hexadecimal representations in one click. Each character in your input is looked up by its Unicode code point and rendered in up to four numeral systems simultaneously, so you can compare, copy or inspect the numeric encoding behind any letter, digit, symbol or emoji.

Everything runs locally in your browser. The text you paste is never sent to a server, making the tool safe for sensitive data, private keys and confidential documents.

For example, typing Hi produces:

Binary:
01001000 01101001
Hex:
48 69

What This Tool Does

When you type or paste text into the input box, the converter splits it into individual characters (using JavaScript Array.from so multi-byte emoji like “😀” are handled as a single entry) and converts each one to the selected bases. The results appear instantly in four labeled output cards that you can show, hide or copy independently.

Use it to quickly find the binary encoding of a password, the hex code of a symbol, or the decimal Unicode value of a character you can’t type. The alphanumeric reference table below lists the binary, octal, decimal and hex codes for every uppercase and lowercase letter and every digit.


Features & Settings

Show: All four bases / Single base: Switch between displaying all four outputs at once (binary, octal, decimal, hexadecimal) or focus on just one base. Other cards are hidden so you can concentrate on the format you need.

Separator: Choose a separator that goes between each character’s code: space (default), newline, comma, or a custom string you type. Useful when you need one-code-per-line output for spreadsheets or comma-delimited import.

Binary equal length (8 bits): When on, every byte is padded with leading zeros to exactly 8 digits so all codes line up. With the default settings the input Hi becomes:

Before (off):
1001000 1101001
After (on):
01001000 01101001

Binary separate bytes: Inserts a space between each 8-bit byte so multi-byte strings stay readable. With it off the binary codes run together as one continuous string.

Hex uppercase letters: Controls whether hex digits A–F are shown as uppercase (4A) or lowercase (4a). Uppercase is on by default.

Show base prefixes: Prepends the standard prefix to each code: 0b for binary, 0o for octal and 0x for hexadecimal. Prefixes are applied per byte and only appear when a separator is active.


When to Use

  • Debugging character encoding issues. When a web page, email or file displays garbled text, converting the suspicious characters to hex or decimal reveals their actual Unicode code point so you can trace the root cause.
  • Studying computer science fundamentals. Students can instantly see how letters and symbols map to the binary and hexadecimal numbers used inside CPUs, memory addresses and networking protocols.
  • Preparing data for hardware or firmware work. Embedded systems and network protocols often require hex or binary byte sequences; paste the human-readable text and copy the formatted output directly.
  • Creating character code reference tables for documentation. The built-in alphanumeric table in the content below gives you a clean, ready-to-copy list of codes for every letter and digit.
  • Verifying encoding assumptions. When working with multi-byte characters like emoji, the tool shows exactly how many bytes each character occupies and their numeric values.

Examples

Example 1 – A simple greeting
Input:
Hi
Output:
Binary:   01001000 01101001
Octal:    110 151
Decimal:  72 105
Hex:      48 69
Example 2 – Accented characters
Input:
Café
Output:
Binary:   01000011 01100001 01100110 11101001
Octal:    103 141 146 351
Decimal:  67 97 102 233
Hex:      43 61 66 E9

Note how the accented “é” has a much higher code point (233 decimal / E9 hex) than the basic Latin letters around it.

Example 3 – Digits as text
Input:
2026
Output:
Binary:   00110010 00110000 00110010 00110110
Octal:    62 60 62 66
Decimal:  50 48 50 54
Hex:      32 30 32 36

The digits “2”, “0” and “6” are separate characters, not the number 2026. Each digit gets its own code.

Example 4 – An emoji (multi-byte)
Input:
😀
Output:
Binary:   11111011000000000
Octal:    373000
Decimal:  128512
Hex:      1F600

This smiley emoji lives above the Basic Multilingual Plane. Its code point (U+1F600 / 128512 decimal) needs 17 bits, which is why equal-length padding is off when you toggle it manually for high code points.


Alphanumeric Conversion Table

Below are the binary, octal, decimal and hexadecimal codes for each uppercase and lowercase letter and for every digit. These are the Unicode code points (which match ASCII for these basic characters), so you can use this reference to look up any letter or number you see in the tool’s output.

Digits (0-9)
CharBinaryOctalDecimalHex
0110000604830
1110001614931
2110010625032
3110011635133
4110100645234
5110101655335
6110110665436
7110111675537
8111000705638
9111001715739
Uppercase Letters (A-Z)
CharBinaryOctalDecimalHex
A10000011016541
B10000101026642
C10000111036743
D10001001046844
E10001011056945
F10001101067046
G10001111077147
H10010001107248
I10010011117349
J1001010112744A
K1001011113754B
L1001100114764C
M1001101115774D
N1001110116784E
O1001111117794F
P10100001208050
Q10100011218151
R10100101228252
S10100111238353
T10101001248454
U10101011258555
V10101101268656
W10101111278757
X10110001308858
Y10110011318959
Z1011010132905A
Lowercase Letters (a-z)
CharBinaryOctalDecimalHex
a11000011419761
b11000101429862
c11000111439963
d110010014410064
e110010114510165
f110011014610266
g110011114710367
h110100015010468
i110100115110569
j11010101521066A
k11010111531076B
l11011001541086C
m11011011551096D
n11011101561106E
o11011111571116F
p111000016011270
q111000116111371
r111001016211472
s111001116311573
t111010016411674
u111010116511775
v111011016611876
w111011116711977
x111100017012078
y111100117112179
z11110101721227A

Benefits

The Text to Base Converter saves time when you need numeric representations of text for technical work. Instead of running your text through four separate tools, this single converter produces binary, octal, decimal and hexadecimal output in one pass. You can focus on the base you need or view all four side by side, then copy or download the result instantly.

It handles every Unicode character, including emoji, accented letters and symbols in any language. Multi-byte characters like “😀” are treated as a single code point rather than being split into surrogate pairs, so the output always reflects the true numeric value of each character.

Full output customization lets you match the exact format a project requires. You can pad binary bytes to equal length, choose separators for spreadsheet import, toggle hex letter case, and add language-standard prefixes (0b, 0o, 0x). A complete alphanumeric conversion table is included below the tool so you can look up the binary, octal, decimal and hex code of any letter or digit at a glance. Everything runs entirely in your browser with zero network requests, so your text never leaves your machine.


FAQs

FAQ 1: What is a Unicode code point?
Answer: A code point is the numeric value assigned to a character in the Unicode standard. The letter “A” is code point 65, the emoji “😀” is 128512, and so on. This tool shows you those numbers in four different numeral bases.

FAQ 2: What is the difference between binary, octal, decimal and hexadecimal?
Answer: They are the same numbers written in different bases. Binary (base 2) uses only 0 and 1, octal (base 8) uses digits 0–7, decimal (base 10) is the everyday system, and hexadecimal (base 16) uses 0–9 plus A–F. Hex and binary are especially common in computing because they align neatly with byte boundaries.

FAQ 3: Does it handle emoji and characters outside the Basic Multilingual Plane?
Answer: Yes. The tool uses Array.from and codePointAt so characters like emoji (“😀”, “🎉”) are treated as a single code point rather than being split into surrogate pairs.

FAQ 4: Is my text sent to a server?
Answer: No. All conversion happens entirely in your browser using JavaScript. Nothing you type or paste is transmitted anywhere, so the tool is safe for passwords, API keys and other sensitive data.

FAQ 5: Can I upload a file instead of pasting text?
Answer: Yes. Click the “Upload a file” link above the input area to load any plain-text file. The file contents appear in the input textarea ready for conversion.


Tools Worth Trying

TextToolz

The Ultimate Text Tools

TextToolz works seamlessly to let you convert and design your text. It is fast, reliable and secure. Trusted by thousands of users.