Updated November 2026 · free, works in your browser
Formula
Value = Σ digit × baseposition, counting positions from 0 on the right. To write a value in another base, divide it repeatedly by that base and read the remainders from last to first. Digits above 9 use letters A–Z (A = 10 … V = 31). Negative numbers keep a minus sign in front.
To convert a number between bases, type it in, choose the base it is written in, and read the decimal, hexadecimal, octal, binary and base32 versions instantly. The same converter handles decimal to hex, hex to decimal, binary to decimal and octal to decimal, including very large whole numbers.
How to use
- Type your number into the Number field. Spaces, underscores and a leading minus sign are accepted, and so are the prefixes 0x, 0b and 0o when they match the chosen base.
- Pick the base your number is written in: Decimal, Hex, Octal, Binary or Base32.
- Read the results below. They update with every keystroke.
- If a digit does not belong to the chosen base, a short message tells you which one, for example the digit 2 in a binary number.
- Use the copy button to share a link that reopens the same number and base.
How it is calculated
Every base uses positional notation. A number is the sum of each digit multiplied by the base raised to that digit's position, counting from zero on the right:
value = dn × bn + … + d1 × b1 + d0 × b0
Here d is a digit, b is the base and n is the position. For example, hex 2F is 2 × 16 + 15 = 47. To go the other way, divide the decimal value by the target base again and again and read the remainders from last to first. The converter uses arbitrary-precision integers, so long values are not rounded.
Digits above 9 are written as letters, with A = 10, B = 11 and so on. Base32 here is the positional system with digits 0–9 and A–V, as used by the radix 32 option in many programming languages. This differs from the RFC 4648 Base32 text encoding for bytes, which uses a different alphabet.
Common bases for the value 255
| Base | Name | Digits used | 255 written as |
|---|---|---|---|
| 10 | Decimal | 0–9 | 255 |
| 16 | Hexadecimal | 0–9, A–F | FF |
| 8 | Octal | 0–7 | 377 |
| 2 | Binary | 0–1 | 11111111 |
| 32 | Base32 | 0–9, A–V | 7V |
Frequently asked questions
How do I convert hex to decimal?
Select Hex, type the value such as 1A3 and read the decimal result. By hand, multiply each digit by a power of 16 and add them up: 1 × 256 + 10 × 16 + 3 = 419.
Why do programmers use hex and binary?
Computers store information as bits, so binary matches the hardware. Each hex digit stands for exactly four bits, which makes hex a compact way to write long binary values.
Does it support negative numbers or fractions?
Negative whole numbers are shown with a minus sign, not as two's complement. Fractions and decimal points are not supported, only integers.
Is the output case sensitive?
No. You can type letters in upper or lower case. Results are always shown in upper case.
How large a number can I convert?
Up to 256 digits in the base you entered. Longer input shows a message instead of a result.
Numbers on the road
Booking references, room numbers, time offsets and flight codes all rely on small numeric conventions, and a quick check saves confusion. Once the details are sorted, the same careful approach works when you plan accommodation: compare hotels by destination, dates, location and cancellation terms before you decide.
Other tools
- US to Metric ConverterConvert US and British units of length, weight and volume to metric and back, instantly.
- Sail Performance CalculatorCalculate displacement/length ratio, sail area/displacement ratio, capsize screening value and hull speed from a boat's dimensions.
- Nautical Unit ConverterConvert knots, mph, km/h and m/s, or nautical miles, miles, kilometres, metres and feet, instantly.