⇄

Number Base Converter

Convert number base converter using the available input and format options.

Choose a file or fill the fields, then click Run tool.

About Number Base Converter

Programmers, students and network engineers often need to read a number in binary, octal, decimal or hexadecimal. Common jobs include checking a bitmask, reading a memory address or doing computer science homework that moves values between bases.

How it works

You enter a number and pick a from base and to base between 2 and 36. JavaScript's parseInt reads the input in the from base, then toString writes it in the target base, and the result is uppercased. Parsing stops at the first character that is not valid for the base, so later digits are silently ignored. Fractions are not supported, and very large integers lose precision beyond about 9 quadrillion.

How to use Number Base Converter

  1. Complete the available fields: Number, From base, To base. Use the field labels and examples shown in the workspace.
  2. Select “Run tool” and check the result before copying or downloading it.

Worked example

Enter 255 with from base 10 and to base 16. The tool shows FF. With to base 2, it shows 11111111. Entering 1A from base 16 to base 10 gives 26. Converting 777 from base 8 to base 10 gives 511, and 100 from base 36 gives 1296.

Tips for a better result

  • Do not include prefixes like 0x or 0b. Enter just the digits and set the base field.
  • Check that every character is valid for the from base. 129 in base 8 stops at the 9 and is read as octal 12, or decimal 10.
  • For numbers larger than 2 to the power 53, use a programming tool with big integer support.

Frequently asked questions

Why did it show NAN?

The first character was not valid in the chosen base, so nothing could be parsed. Check the input and the from base.

Can it convert fractions like 10.5?

No. Parsing stops at the decimal point, so 10.5 is treated as 10.

Does it handle negative numbers?

Yes. A leading minus sign is kept, so -255 in base 10 becomes -FF in base 16. Two's complement is not shown.

What to check

Some measures vary by region or date and may not have a universal equivalent.

Read the Privacy Policy for information about local processing, connected services and advertising.