Number Base Converter

Updated July 2026

Type a number in any base — binary, decimal, hexadecimal or octal — and the other three update live. Each field is validated for its base, large values are supported, and everything runs privately in your browser.

Convert numbers between binary (base 2), decimal (base 10), hexadecimal (base 16) and octal (base 8). For example, decimal 255 is binary 11111111, hex FF and octal 377.
Decimal value
Bits required
Bytes (rounded up)
Encodes each character to its 8-bit binary code.
Binary (8 bits per character)

How number base conversion works

A number base, or radix, is simply how many distinct digits a system uses before it rolls over to the next place. Decimal (base 10) uses ten digits, 0–9. Binary (base 2) uses just 0 and 1, octal (base 8) uses 0–7, and hexadecimal (base 16) uses 0–9 plus A–F to stand for the values ten through fifteen. The same quantity can be written in all four bases.

To read a number in any base, multiply each digit by the base raised to its position (starting at 0 on the right) and add the results. To go the other way — from decimal into another base — repeatedly divide by the target base and read the remainders from last to first. Computers favour binary because a wire is either on or off, and hexadecimal is popular because each hex digit packs exactly four bits.

Worked example: take decimal 13. Divide by 2 repeatedly: 13÷2 = 6 r1, 6÷2 = 3 r0, 3÷2 = 1 r1, 1÷2 = 0 r1. Reading the remainders bottom-to-top gives 1101 in binary. That is D in hex and 15 in octal — the same value, four different notations.

Reference note: conversions use standard positional notation. Values up to 9,007,199,254,740,991 (the safe integer limit) are handled with regular numbers; very large binary and hexadecimal inputs fall back to BigInt so no precision is lost.

Conversion table (0–16)

DecimalBinaryHexOctal
0000
1111
21022
31133
410044
510155
611066
711177
81000810
91001911
101010A12
111011B13
121100C14
131101D15
141110E16
151111F17
16100001020

Frequently asked questions

How do I convert decimal to binary?
Repeatedly divide the decimal number by 2 and record each remainder, then read the remainders from last to first. For example 13 gives remainders 1, 0, 1, 1, so 13 is 1101 in binary. The tool above does this instantly as you type.
What is 255 in binary and hex?
Decimal 255 is 11111111 in binary (eight ones — the most that fits in one byte), FF in hexadecimal and 377 in octal. It is the maximum value of an unsigned 8-bit number.
How do I convert binary to decimal?
Multiply each binary digit by its place value (a power of two) and add them up. Reading 1101 from the right: 1×1 + 0×2 + 1×4 + 1×8 = 13.
What is hexadecimal used for?
Hexadecimal (base 16) is a compact shorthand for binary — each hex digit equals four bits. It is used for CSS colours like #FF8800, memory addresses, byte values and low-level debugging.
How do I convert hex to binary?
Replace each hex digit with its four-bit binary equivalent. F is 1111 and 8 is 1000, so hex F8 becomes 11111000. The mapping is exact because 16 is 2 to the power 4.
What is octal?
Octal is base 8 and uses only the digits 0–7. Each octal digit equals three binary bits, which is why it appears in Unix file permissions such as 755.
⚡ Number Base Converter — by larely ↗

Related tools

Number Base Converter

Convert numbers between any base from 2 to 36, including binary, octal and hex.

Temperature Converter

Convert between Celsius, Fahrenheit and Kelvin instantly.

Decimal to Fraction Converter

Convert any decimal to a simplified fraction, including repeating decimals.

Ring Size Converter

Convert ring sizes between US, UK, EU and Japan, plus mm measurements.

Data Storage Converter

Convert between bytes, KB, MB, GB and TB in both 1000 and 1024 bases.

Weight Converter

Convert weight between kg, lb, oz, grams and stone instantly.

Length Converter

Convert length between cm, inches, meters, feet, km and miles.

Angle Converter

Convert angles between degrees, radians, gradians and turns.

Pressure Converter

Convert pressure between psi, bar, kPa, atm and mmHg.

Speed Converter

Convert speed between mph, km/h, m/s, knots, ft/s and Mach.

Time Converter

Convert time between seconds, minutes, hours, days, weeks and years.

Volume Converter

Convert volume between liters, gallons, cups, fluid ounces, mL and more.

Browse all 251 free tools →