Source: https://goodhandover.co.uk/tools/number-base-converter/

[Computer science maths](https://goodhandover.co.uk/tools/computer-science-maths/#year-1) / Year 1

🔒 Files never leave your device

# Number base converter

Convert a signed integer between binary, decimal, hexadecimal or any base from 2 to 36. Your inputs stay on your device.

## Set up your task

Ready. Processing stays in this browser.

Files and text stay on your device. [Privacy details](https://goodhandover.co.uk/privacy/).

 

## How to use Number base converter

Convert a signed integer between binary, decimal, hexadecimal or any base from 2 to 36. The pre-filled problem gives you a worked starting point. Compare the response with your own working before trying the self-check below.

 

- Check the example inputs: Number to convert, Source base, Target base.

- Change the inputs for your problem. Results update as you type, so finish entering the values before copying an answer.

- Use the working to check an intermediate value or assumption. Then change the example as suggested in the self-check and compare the result.

 

## Supported inputs and limits

Enter up to 64 digits, with an optional sign. Leave off prefixes such as 0x and use A–Z for digits above 9.

 

## How it works

A numeral represents a sum of digit values multiplied by powers of its base. In hexadecimal FF, the first F contributes 15 × 16 and the second contributes 15. The decimal value is 255. The base changes the representation of the integer, while the integer itself is preserved.

The calculation accumulates digits from left to right. Starting at zero, multiply the current value by the source base before adding the next digit. Writing in the target base reverses that process by taking remainders. Integer arithmetic keeps the result exact when the input is too large for a JavaScript number.

 

## Example

Run the pre-filled example. Its first result is “Base 2: 11111111”.

Number to convert

FF

Source base

16

Target base

2

Base 2: 11111111
Decimal: 255
Multiply the accumulated value by the source base, then add each digit.

 

## Questions about Number base converter

### How do I enter hexadecimal without a prefix?

Enter the digits only, for example FF, and choose base 16. A sign can come before the first digit.

### Why is digit 2 refused in base 2?

Each digit is smaller than its base. Binary has just 0 and 1, so 2 can only appear as part of the base label, not as a binary digit.

### Convert decimal 31 to hexadecimal and binary.

Expect 1F in hexadecimal and 11111 in binary. The first representation uses 1 × 16 + 15. The second is the sum of the first five powers of two.

 
 

## Related tools

[Year 1: Foundations](https://goodhandover.co.uk/tools/computer-science-maths/#year-1)

- [Two’s complement calculator](https://goodhandover.co.uk/tools/twos-complement-calculator/)

- [IEEE 754 float converter](https://goodhandover.co.uk/tools/ieee-754-converter/)

- [Truth table generator](https://goodhandover.co.uk/tools/truth-table-generator/)

- [Set operations calculator](https://goodhandover.co.uk/tools/set-operations-calculator/)

 

Last updated 24 November 2026
