Number Base Converter

Convert a number between decimal, binary and hexadecimal. Enter the number and choose which number system it's written in, and the result appears in the other two.

Decimal
42
Base 10
Binary
101010
Hexadecimal
2A

How to use the number base converter

  1. Enter the number you want to convert.
  2. Choose which number system the number is written in — decimal, binary or hexadecimal.
  3. The calculator automatically shows the number in the other two number systems as you type.

What are the different number systems?

Decimal (base 10) is the number system we use daily, built from the digits 0-9. Binary (base 2) uses only the digits 0 and 1, and is the foundation of all modern computer technology — every bit in a computer is either off (0) or on (1). Hexadecimal (base 16) uses the digits 0-9 and the letters A-F, and is often used as a more compact way to write binary numbers, for example in color codes (like #FF5733) and memory addresses.

42 (decimal) = 101010 (binary) = 2A (hexadecimal)

All three actually represent the same value — just with a different number of digits available per position. Binary uses 2 digits (0-1), decimal uses 10 digits (0-9), and hexadecimal uses 16 "digits" (0-9 and A-F).

Note: Only positive integers are supported. Make sure the number you enter only contains valid characters for the selected number system.

Frequently asked questions

What are binary numbers used for?

Binary numbers are the foundation of all digital electronics and computing. Computers store and process all information as binary digits (bits), because electronic circuits can easily represent two states — off and on, or 0 and 1.

Why does programming use hexadecimal numbers?

Hexadecimal numbers are a compact way to represent binary numbers, since one hex digit corresponds to exactly four binary digits. This makes long binary numbers much shorter and easier to read, and is used for example in color codes, memory addresses and debugging.

Can I convert negative numbers?

This calculator only supports positive integers. Negative numbers are represented differently depending on system and context (for example two's complement in binary), and fall outside the scope of a simple converter like this.