WerklyTools
EN
Buy me a coffee

Number base converter

Type a number in any base and instantly see its equivalent in binary, octal, decimal, hexadecimal and another base of your choice (2 to 36). It handles very large numbers without losing precision, understands prefixes such as 0x or 0b and also shows two’s complement.

Processed 100% in your browser

Binary (base 2)
Octal (base 8)
Decimal (base 10)
Hexadecimal (base 16)
Other base
Two’s complement

Ctrl + Enter runCtrl + C copy result

How to use

  1. 1Type the number (spaces or underscores are fine, and so are 0x, 0b or 0o prefixes).
  2. 2Choose which base it is written in: binary, decimal, hexadecimal or another.
  3. 3Read the result in binary, octal, decimal, hexadecimal and your chosen output base.
  4. 4Copy the value you need; turn on prefixes or 4-bit grouping if you like.

Use cases

  • Convert a network mask or an address between binary and decimal.
  • Interpret hex colors, memory addresses or register values.
  • Solve number-system exercises in a computer science class.
  • See how a negative number is represented in 8, 16, 32 or 64 bits.

Frequently asked questions

Is there a size limit?

Not in practice: the conversion uses arbitrary-size integers, so you can convert numbers with hundreds of digits without losing precision.

Does it support decimals or fractions?

No. The tool converts whole numbers. Fractions in other bases need a specific representation.

What is two’s complement?

It is the usual way to store signed integers in binary. Here you see it at 8, 16, 32 and 64 bits; if the number does not fit that width, it says so.

Which digits does a base above 10 use?

Letters of the alphabet: A = 10, B = 11… up to Z = 35. That is why the maximum base is 36.

Is anything sent to a server?

No. Everything is calculated in your browser.

Related tools