Quick answer
A number base converter rewrites a number using digits 0–9 and a–z in another base. 255 in base 10 is FF in base 16 (and 11111111 in base 2).
Enter a number, the base it is in and the target base. The calculator returns the converted number and its decimal value.
Related tools: Binary Calculator: Add, subtract, multiply, divide or apply bitwise operations to binary numbers. Hex Calculator: Add, subtract or multiply hexadecimal numbers. Hex to Text Converter: Decode hexadecimal bytes as UTF-8 text.
How to use the Number Base Converter
- Type number.
- Enter from base (a whole number, between 2 and 36). It starts at 10.
- Enter to base (a whole number, between 2 and 36). It starts at 16.
- Press Calculate to see the result, and use Reset to start again.
| Input | What to enter | Allowed values |
|---|---|---|
| Number | Text | — |
| From base | A whole number | ≥ 2, ≤ 36, starts at 10 |
| To base | A whole number | ≥ 2, ≤ 36, starts at 16 |
Formula and method
Formula
positional notation with digits 0–9 and a–z
IEEE-754 double precision; shown to the decimals indicated.
Arbitrary-size integers; a leading minus sign is allowed.
Worked examples
These examples are verified: each one is an automated test case that the live calculator must reproduce exactly.
Example 1
Inputs: Number = 255; From base = 10; To base = 16.
| Result | Value |
|---|---|
| Result | FF |
| Decimal | 255 |
Example 2
Inputs: Number = ff; From base = 16; To base = 2.
| Result | Value |
|---|---|
| Result | 11111111 |
| Decimal | 255 |
Example 3
Inputs: Number = 1010; From base = 2; To base = 10.
| Result | Value |
|---|---|
| Result | 10 |
| Decimal | 10 |
The first line is the headline result (result). Below it the number Base Converter lists decimal, which describe the same case from other angles. IEEE-754 double precision; shown to the decimals indicated.
How conversion works
To go from decimal to base b, divide repeatedly by b and read the remainders backwards. 255 ÷ 16 = 15 remainder 15, giving FF. Reverse: F × 16 + F = 255.
Range
Bases from 2 to 36 use the digits 0–9 and a–z. The tool handles integers only. Programmers use binary, octal (base 8) and hexadecimal; base 36 is used for short IDs.
How the result changes with to base
Holding every other input at the first worked example, this table changes only to base. It shows how sensitive the answer is to that one value; each row was produced by running this calculator.
| To base | Result | Decimal |
|---|---|---|
| 8 | 377 | 255 |
| 16 | FF | 255 |
| 32 | 7V | 255 |
What happens with invalid input
These messages are produced by the calculator itself, so you know what to fix.
- Number: left empty shows "Enter number." beside that field and no result.
Choosing between the Number Base Converter and similar calculators
Each row shows what a related calculator on this site asks for and what it returns, so you can pick the one that matches your question.
| Calculator | You enter | It returns |
|---|---|---|
| [Binary Calculator](/technology/binary-calculator/) | first binary number, second binary number and operation | Result |
| [Hex Calculator](/technology/hex-calculator/) | first hex number, second hex number and operation | Result |
| [Hex to Text Converter](/technology/hex-to-text/) | hex bytes | Text |
| [Two's Complement Calculator](/technology/twos-complement/) | bit width and decimal integer | Binary |
| [Binary to Text Converter](/technology/binary-to-text/) | binary bytes | Text |
Background: number systems
To convert a whole number from decimal to another base, divide repeatedly by the base and read the remainders backwards; to convert to decimal, multiply each digit by the base raised to its position (counting from 0 at the right) and add. Each hexadecimal digit equals exactly four bits and each octal digit three, so binary converts to hex by grouping bits in fours from the right.
255 in decimal is 11111111 in binary and FF in hexadecimal.
Assumptions and limitations
- Integers only
If a required value is empty, not a number, or outside its allowed range, the form marks that field with a message and shows no result instead of a misleading number. The automated checks deliberately try invalid entries for number to confirm this.
Frequently asked questions
What is 10 in binary?
10 in decimal is 1010 in binary: 8 + 2.
What is 7F in decimal?
7F in hexadecimal is 7 × 16 + 15 = 127.
Why hexadecimal?
It's compact for binary.
What does the Number Base Converter calculate?
Convert a number between bases 2 and 36. It returns Result and Decimal.
What formula does the Number Base Converter use?
positional notation with digits 0–9 and a–z. Arbitrary-size integers; a leading minus sign is allowed.
What do I need to enter in the number Base Converter?
You enter Number, From base and To base.
How is the result rounded or limited?
IEEE-754 double precision; shown to the decimals indicated. Integers only.
What is an example of a number Base result?
With number 255, from base 10 and to base 16, the result is FF.
Where does the method come from?
The method follows: Positional numeral systems and two's-complement representation: see IEEE 754-2019 and ISO/IEC 9899 (C standard) for the integer and floating-point formats computers use; the arithmetic itself is base-b place-value expansion.
Related calculators
- Binary Calculator — Add, subtract, multiply, divide or apply bitwise operations to binary numbers.
- Hex Calculator — Add, subtract or multiply hexadecimal numbers.
- Hex to Text Converter — Decode hexadecimal bytes as UTF-8 text.
- Two's Complement Calculator — Two's-complement representation of an integer in a fixed bit width.
- Binary to Text Converter — Decode groups of 8 bits as UTF-8 text.
- Week Number Calculator — ISO 8601 week number of a date.
Sources
- Positional numeral systems and two's-complement representation: see IEEE 754-2019 and ISO/IEC 9899 (C standard) for the integer and floating-point formats computers use; the arithmetic itself is base-b place-value expansion
Content last reviewed 2026-11-04. Formulas and worked examples are checked by automated tests against independently computed values.