T

Text Machine

Powerful text tools, in your browser

Number Base Converter

Convert a number between binary, octal, decimal, and hexadecimal. Enter a value, choose the base it is written in, and see all four bases at once — arbitrary precision, all in your browser, nothing uploaded.

Convert from

Number
Result

Enter a number above to see it in every base.

How to use Number Base Converter

  1. 1

    Enter your number

    Type or paste a number into the field. Spaces and underscores are ignored, so grouped values like 1010_1101 work too.

  2. 2

    Choose the starting base

    Pick whether your number is written in binary, octal, decimal, or hexadecimal.

  3. 3

    Read every base at once

    The value is shown in binary, octal, decimal, and hexadecimal together, so you can compare or copy whichever one you need.

  4. 4

    Copy the result

    Use the copy button next to any base to put that value on your clipboard.

Number Bases: Binary, Octal, Decimal, and Hex

What a number base is

A number base, also called a radix, is how many distinct digit symbols a number system uses and therefore how much each position is worth. Decimal is base 10, with the ten digits 0 through 9. Binary is base 2 with two digits, octal is base 8 with eight, and hexadecimal is base 16 with sixteen. The same quantity can be written in any base — only the symbols and column weights change, never the underlying value.

This converter takes a number written in one base and shows it simultaneously in binary, octal, decimal, and hexadecimal, so you never have to convert twice. Understanding bases is the key to reading machine data fluently, because computers, programmers, and various standards each favor a different base for good practical reasons.

Positional notation across bases

Every one of these systems is positional, meaning a digit's value is multiplied by a power of the base according to its column. In decimal the columns from the right are powers of ten: ones, tens, hundreds. In any base b, the columns are powers of b: the rightmost is b to the power of zero (always 1), then b, then b squared, and so on. To find a number's value you multiply each digit by its column's power and add the results.

This single rule unifies all bases. Binary columns are powers of two (1, 2, 4, 8), octal columns are powers of eight (1, 8, 64, 512), and hexadecimal columns are powers of sixteen (1, 16, 256, 4096). Converting any number to decimal is just applying this weighted sum; converting decimal to another base is the reverse, using repeated division by that base.

Digit symbols beyond 9

A base needs exactly as many digit symbols as its size, and that raises a question for bases above ten: how do you write a single digit worth more than nine? Hexadecimal solves it by borrowing letters. After 0 through 9 it uses A for ten, B for eleven, C for twelve, D for thirteen, E for fourteen, and F for fifteen. So a single hex digit spans the values zero to fifteen, and case does not matter, so F and f are equal.

Bases at or below ten need no letters. Binary uses only 0 and 1, octal uses 0 through 7, and decimal uses 0 through 9. This is also why certain digits are illegal in certain bases: an 8 or 9 cannot appear in octal, and only 0 and 1 are valid in binary. If you enter a digit that is too large for the chosen base, the value is not a valid number in that base and the converter will tell you so.

Why each base is used

Binary is the native language of computers because hardware switches have two states, on and off, mapping directly to 1 and 0. Everything a machine stores is ultimately binary, which makes base 2 essential for understanding how data is represented at the lowest level, even though long binary numbers are tedious for people to read.

Hexadecimal is the programmer's compact shorthand for binary: one hex digit equals exactly four bits, so two hex digits describe a full byte cleanly, which is why hex dominates memory addresses, color codes, and byte dumps. Octal groups bits in threes and is a legacy from older computers; it still appears in places like Unix file permissions, where 755 is an octal number. Decimal remains the base humans count in, so it is the natural endpoint when a value needs to be read by a person.

Worked example: 0xFF in every base

Take the hexadecimal value FF and convert it across all four bases. Reading it by place value, the left F is in the sixteens column and the right F is in the ones column, so it is 15 times 16 plus 15 times 1, which is 240 plus 15, equaling 240 + 15 = 255 in decimal. That is the maximum value of a single byte.

The same quantity is 11111111 in binary — eight ones, since 255 is one less than 256, which is two to the eighth power. In octal it is 377, because 255 is 3 times 64 plus 7 times 8 plus 7. So one value, 255, appears as FF, 11111111, 377, and 255 depending on the base, and this converter shows all four at once so you can compare them directly.

A second cross-base example

Convert the decimal number 100 into the other three bases. For binary, find the powers of two that sum to it: 64 + 32 + 4 equals 100, so the 64, 32, and 4 columns are set and the result is 1100100. For hexadecimal, divide by sixteen: 100 is 6 times 16 (96) with a remainder of 4, giving 64. For octal, divide by eight: 100 is 1 times 64 plus 4 times 8 plus 4, giving 144.

So decimal 100 is binary 1100100, octal 144, and hex 64. Notice how the higher the base, the shorter the representation, because each column carries more weight. This compactness is exactly why hexadecimal is preferred for writing out byte values that would be unwieldy in binary.

Large numbers, negatives, and input formatting

This converter uses arbitrary-precision big integers, so it converts values far beyond the usual 64-bit limit exactly, with no rounding — useful when you are working with long hashes, identifiers, or cryptographic values that would overflow ordinary number types. It also accepts negative numbers: put a minus sign in front and the sign carries through to every base in the result.

For convenience, spaces and underscores in your input are ignored, so a grouped value like 1010_1101 or 255 255 is read as a single number. This lets you paste values formatted for readability without cleaning them up first. Just make sure every digit is legal for the base you select — no 2 in binary, no 8 or 9 in octal, only 0-9 and A-F in hex — or the input will be flagged as invalid for that base.

Where base conversion helps

Base conversion is a daily task in programming and systems work. You read a memory address or a register value in hex and want the decimal equivalent, you translate a binary bit pattern into compact hex, or you decode a Unix permission like 644 from octal. Seeing all four bases together removes the mental juggling and the risk of a slip in manual arithmetic.

It is equally valuable for learning. Working a number through binary, octal, decimal, and hex side by side makes positional notation click, and it clarifies why computers, programmers, and standards each lean on a particular base. Whether you are debugging, studying, or just curious how a value looks in another system, converting between bases is one of the most broadly useful operations in computing.

Frequently asked questions

How do I convert hexadecimal to decimal?
Choose Hex as the starting base and type your hexadecimal value, such as ff. The decimal result, 255, appears instantly alongside the binary and octal forms.
Which bases are supported?
Binary (base 2), octal (base 8), decimal (base 10), and hexadecimal (base 16). Every value is shown in all four at once so you never have to convert twice.
Can it handle very large numbers?
Yes. The converter uses arbitrary-precision big integers, so values far beyond the usual 64-bit limit convert exactly without any rounding.
Does it accept negative numbers?
Yes. Add a minus sign in front of the value and the sign is carried through to every base in the result.
Is anything sent to a server?
No. The conversion runs entirely in your browser, so your numbers never leave your device and nothing is stored.

Related tools

Keep going with these handy tools

Unix Timestamp Converter

JSON to CSV Converter

CSV to JSON Converter

JSON to YAML Converter

Text to Binary Converter

Text to Hex Converter