Skip to content
TPTechPixelly
Converters

Number Base Converter

Convert between binary, octal, decimal, hex and any base up to 36.

Loading tool…

About this number base converter

Binary, octal, decimal and hexadecimal are four ways of writing the same number. Hex is popular in programming because one hex digit is exactly four bits, so it maps onto binary cleanly while staying short enough to read.

This converts between all of them as you type, and shows the value as raw bits alongside so you can see what a bitmask or a shift is actually doing.

How to use it

  1. Type a value into any of the four boxes — the others update instantly.
  2. For an unusual base, use the custom base selector.
  3. The bit view underneath shows the binary padded to 8, 16, 32 or 64 bits.

Number Base Converter — FAQ

Why is hexadecimal used in programming?

One hex digit represents exactly four bits, so a byte is always two hex digits. It is far more compact than binary and converts to it without any arithmetic.

Does it handle negative numbers?

Yes. Negative values are shown in two's complement at your chosen bit width, which is how they are actually stored.

What is the largest number it supports?

It uses arbitrary-precision integers, so numbers far beyond 64 bits convert exactly with no rounding.

More free tools

See all tools or take a break with a game.