Skip to content

← All tools

Number Base Converter

Convert a number between binary, octal, decimal, hexadecimal and any base from 2 to 36. Type in any field and the rest update instantly. Everything runs locally in your browser.

New to this? Read the Base Converter guide →

(2–36)

Whole numbers only, of any size (arbitrary precision). Letters a–z stand for digit values 10–35. Computed locally — nothing is uploaded.

How to use the base converter

  1. Type a number into the field for the base you have (binary, octal, decimal or hex).
  2. The equivalent value appears in the other bases instantly.
  3. Copy whichever form you need.

Conversion uses arbitrary-precision (big-integer) math, so even very long numbers convert exactly, with no rounding or overflow.

What a number base is

A base is how many distinct digits a system uses before it rolls over to the next place. Decimal (base 10) uses 0–9; binary (base 2) uses just 0 and 1; hexadecimal (base 16) uses 0–9 then a–f. The value is the same number written differently: 255 in decimal is 11111111 in binary and ff in hex.

Why hex and binary matter

Computers store everything in binary, but long bit strings are hard to read, so programmers use hex as a compact stand-in: each hex digit is exactly four bits. That is why colours (#7c3aed), memory addresses and byte values are written in hex. Octal (base 8) groups bits in threes and still shows up in Unix file permissions like 755.

Worked examples

Need a specific pairing such as binary to hex? See the focused converters linked under "Common conversions" above.

Where you'd use this

Programming close to the metal, and reading anything that reports numbers in hex: colour codes, file permissions, memory addresses, bitmask flags and network masks.

For example: A device returns a status register of 0x2A. In binary that is 00101010 — bits 1, 3 and 5 set, which the datasheet maps to "ready", "buffer half full" and "temperature warning".

Common conversions

Frequently asked questions

Which number bases are supported?

Convert between binary (base 2), octal (base 8), decimal (base 10), hexadecimal (base 16) and other bases. Enter a value in one and see the rest instantly.

How do I convert decimal to binary or hex?

Type your decimal number and read off the binary and hexadecimal equivalents — useful for programming, bitmasking and debugging.

Is anything uploaded?

No. The conversion runs entirely in your browser.

Related tools