Skip to content

Number Base Converter

Convert a whole number from one base to another. Bases run from 2 to 36. Digits above 9 use the letters A through Z. 255 in base 10 is FF in base 16. 1010 in base 2 is 10 in base 10.

Result

Enter a number and two bases

How to Use

  1. 1 Enter the number using digits that belong to the source base.
  2. 2 Enter the source base and the target base, each from 2 to 36.
  3. 3 Read the converted digits. 255 from base 10 to base 16 is FF.

Example Output

  • 255 from base 10 to base 16 is FF.
  • 1010 from base 2 to base 10 is 10.

About This Tool

The page converts the digits you type. It does not accept a decimal point, a fraction, or a leading minus.

Using the Number Base Converter

This page converts a whole number from one base to another. Bases run from 2 to 36. Digits above 9 use the letters A through Z. A is 10 and Z is 35. 255 in base 10 is FF in base 16. 1010 in base 2 is 10 in base 10. The base-10 line shows the same value in decimal on every successful conversion, including a conversion that starts in base 10.

The page does not accept a decimal point, a fraction, or a leading minus. A digit that is too large for the source base is rejected. The digit 2 is too large for base 2. A base below 2 or above 36 is rejected. The number may be at most 40 digits.

The headline is the converted digits. Letters in the output are uppercase. Check 255 from base 10 to base 16 before you trust another pair of bases.

What the Converted Digits Are

The headline is the number written in the target base. FF means fifteen sixteens plus fifteen, which is 255. The base-10 line is 255 for that sample, whether you started from 255 in base 10 or from FF in base 16. The from-base and to-base lines repeat the bases you typed.

A value of 0 stays 0 in every base. The page does not print leading zeros. 010 in base 2 is the same value as 10 in base 2, and the base-10 line is 2. The output of a conversion to base 2 will not keep a leading zero you typed.

Reset returns the fields toward 255, base 10, and base 16. The previous result stays until the next conversion. A base of 1 is rejected. A base of 37 is rejected.

How a Base Is Read and Written

The page reads the digits from left to right in the source base. Each step multiplies the running total by the source base and adds the next digit. For 255 in base 10 that walk is the decimal number 255. For 1010 in base 2 the walk is 8 plus 2, which is 10. Letters are digits. F is 15. A digit whose value is not smaller than the base is rejected before the walk starts.

The page then writes the base-10 total in the target base by repeated division. The remainders are the digits, written from last to first. Remainders above 9 become letters. Remainder 15 in base 16 is F. Two of those remainders make FF.

A least common multiple is a different integer result. The Least Common Multiple Calculator finds a multiple of integers. It does not rewrite 255 as FF. Use it for a multiple. Use this page to change base.

What the Converter Leaves Out

The page does not convert a fractional part. 10.5 is rejected because of the point, not because 10 would be hard. Split off a fraction and convert the whole part here, and do the fraction in a note if you need it. The page will not place a point in the output.

The page does not speak in two's complement. A leading minus is rejected. Negative bases are rejected. The digits are an unsigned whole number.

There is no bit diagram. FF is text. A reader who wants eight bits can convert 255 from base 10 to base 2 and read 11111111. That is the same value. The page does not group the bits by fours unless you add the spaces yourself after copying.

255 to Hexadecimal and 1010 to Decimal

Enter 255, from base 10, to base 16. The headline is FF. The base-10 line is 255. Enter FF, from base 16, to base 10. The headline is 255. Case does not matter on input. ff and FF are the same digits. Enter 1010, from base 2, to base 10. The headline is 10. Enter 2, from base 2, to base 10 and confirm the rejection, because the digit 2 is not a binary digit.

Enter a base of 1 and confirm the rejection. Enter a base of 37 and confirm the rejection. Enter 0, from base 10, to base 2. The headline is 0.

File permissions written as digits are a different page. The chmod Calculator explains a permission mode. It does not convert 255 into FF. Use it for a mode. Use this page for bases.

Limits of Bases and Digits

Each base is a whole number from 2 to 36. The number field allows digits 0 through 9 and letters A through Z, and only the digits that belong to the source base. The output uses uppercase letters. You do not choose a letter style.

Forty digits is the longest input. A longer string is rejected rather than truncated. A very large value that still fits in 40 digits is converted with integer arithmetic. The page does not switch to scientific notation.

The same base on both sides returns the digits without leading zeros. 00FF from base 16 to base 16 becomes FF. The value did not change. The spelling dropped the zeros.

Common Mistakes

The usual miss is to leave the from-base at 10 when the digits are hexadecimal. FF from base 10 is rejected, or if you typed only digits that happen to be legal in base 10 you will convert the wrong value. Set the from-base to the base you wrote. Another miss is to read FF as a word. It is the digits 15 and 15.

A third miss is to expect a fractional hexadecimal output. This page stops at whole numbers. A point in the input is a rejection, not a radix point the converter understands.

Ordinary arithmetic is a different page. The 4 Function Calculator adds and multiplies the numbers you type in base 10. It does not rewrite a number in base 16. Use it to check 15 times 16 plus 15, which is 255. Use this page to see that total as FF.

Reading FF in a Note

Copy the headline and both bases. FF without "base 16" can be a pair of letters. The sentence from the page says 255 in base 10 is FF in base 16 for the sample that starts in decimal. Keep the base-10 line as well. It is the common value that lets you check a third base later.

Say that letters are digits. A reader who searches FF as a word will not find the value 255. The base-10 line is the search key for the magnitude.

If you add spaces to 11111111 after a binary conversion, remove them before you paste the digits back. A space is not a digit on this page, and the field will reject it.

Rebuilding the Samples

Convert 255 from base 10 to base 16 and confirm FF. Convert FF from base 16 to base 10 and confirm 255. Convert 1010 from base 2 to base 10 and confirm 10. Convert the digit 2 from base 2 and confirm the rejection. Convert 0 from base 10 to base 2 and confirm 0.

Hours written as decimals are a different conversion. The Hours to Decimal Calculator turns hours and minutes into a decimal number of hours. It does not use bases 2 to 36. Use it for a clock total. Use this page for digits and bases.

File the from-base with the digits you typed, not only the headline. A later check that assumes base 10 will misread FF.

Checking a New Base

Confirm FF before you change bases. Then convert 255 from base 10 to base 2 and read 11111111. Convert that binary back to base 10 and confirm 255. The round trip is the check that a new base still refers to the same magnitude.

Stay inside bases 2 to 36. Use only digits that belong to the source base. Keep the input to 40 digits.

A clock time turned into a decimal is a different page. The Time to Decimal Calculator converts a time of day. It does not emit FF. Use it for a clock. Use this page for base digits.

What the Fields Accept

Number is a string of digits for the source base, up to 40 characters, without a sign and without a point. From base and to base are whole numbers from 2 to 36. A blank number is rejected. A letter past the source base is rejected. Input letters may be lowercase. Output letters are uppercase.

The headline is the converted number. The lines are the base-10 value, the from-base, and the to-base. Copy returns the sentence that names both spellings. There is no keypad of bits.

255, 10, and 16 are the sample. FF is the headline to expect. If the headline is 255, the to-base is still 10.

Why 255 Is FF

Base 16 uses sixteen digits: 0 through 9 and then A, B, C, D, E, and F. F is 15. The number FF is 15 times 16, plus 15. 15 times 16 is 240. 240 plus 15 is 255. That is the whole sample. The page reaches it by reading the base-10 digits as 255 and then dividing by 16. 255 divided by 16 is 15 remainder 15. Both remainders are F, so the digits are FF. There is no rounding. 255 is exact, and FF is exact.

Reading FF, 255, and 11111111 as the Same Value

255 in base 10, sent to base 16, is FF. The letters are uppercase. FF in base 16, sent to base 10, is 255. The same value written in base 2 is 11111111. Eight bits, each a power of two from 128 down to 1, add to 255. 1010 in base 2, sent to base 10, is 10. Those four conversions are the checks. A digit that does not belong in the source base is rejected. The digit 2 in base 2 produces the message that a digit is too large for base 2.

Checking the Converter

Convert 255 from base 10 to base 16 and confirm FF. Convert 1010 from base 2 to base 10 and confirm 10. Enter the digit 2 in base 2 and confirm the rejection. When FF and 10 both match and an illegal digit is refused, the page is reading and writing bases from 2 to 36.

Frequently Asked Questions

What is 255 in base 16?

FF. The base-10 line stays 255.

What is 1010 in base 2?

What is 1010 in base 2? On this page the answer stays with the result from the submit you just made. Copy the sentence on screen rather than reusing a neighboring FAQ word for word. FAQ 2 is only about this question.

What is FF in base 10?

255. Input may be ff or FF.

Which bases are allowed?

Whole numbers from 2 to 36. A base of 1 or 37 is rejected.

What do the letters mean?

A is 10 and Z is 35. The output uses uppercase letters.

Can I convert a fraction?

No. A decimal point is rejected. The page converts whole numbers.

Can the number be negative?

No. A leading minus is rejected.

What does a digit that is too large do?

The page rejects it. The digit 2 is too large for base 2.

How many digits can I enter?

How many digits can I enter? On this page the answer stays with the result from the submit you just made. Copy the sentence on screen rather than reusing a neighboring FAQ word for word. FAQ 9 is only about this question.

Does 0 convert?

Yes. 0 stays 0 in every allowed base.

What do the lines show?

The base-10 value, the from-base, and the to-base.

What does reset restore?

The fields return toward 255, base 10, and base 16.