Number Base Converter

Convert numbers between binary, octal, decimal, hexadecimal, and any base 2-36. Live two-way: edit any field, the others update. Useful for low-level work, IP math, bit manipulation, or sanity-checking that 0xFF really is 255.

Bit view

How to use the Number Base Converter

Type a number in any field. The other bases update live. Hex accepts 0x prefix or bare; binary accepts 0b prefix or bare. Negative numbers work for decimal, displayed as two's complement for hex/binary up to 64-bit precision.

How positional bases relate

Every whole number can be written in any base: base 10 groups by powers of ten, base 2 by powers of two, base 16 by powers of sixteen. The value is the same; only the notation changes. Hexadecimal is popular in programming because each hex digit maps to exactly four binary bits, so 0xFF is plainly 1111 1111, or 255. Octal groups bits in threes, a hangover from older hardware and still seen in Unix file permissions.

This converter shows binary, octal, decimal, and hex side by side, plus any base from 2 to 36, and updates every field as you type in one. Negative numbers display in two's complement for the binary and hex views, the representation actual hardware uses, up to 64-bit precision — handy for bit manipulation, IP math, or simply confirming a hex literal is the value you think it is.

Common use cases

  • Bit manipulation — see a value's binary form while working with masks and flags.
  • Reading hex literals — confirm that a constant like 0xFF is the decimal value you expect.
  • File permissions — translate between octal Unix modes and their binary meaning.
  • Networking math — convert between decimal and hex when working with addresses or masks.
  • Learning number systems — watch how the same number looks across bases as you type.

Frequently asked questions

What bases does it support?

Binary, octal, decimal, and hex have dedicated fields, and a custom field handles any base from 2 to 36. Above base 10 the extra digits are the letters A onward, so base 36 uses 0–9 then A–Z.

How are negative numbers shown in binary and hex?

As two's complement, the representation hardware actually uses, up to 64-bit width. Decimal shows the ordinary signed value, while the binary and hex views show the bit pattern that encodes it.

Why does each hex digit equal four binary bits?

Because 16 is 2 to the 4th, one hex digit covers exactly four bits. That clean mapping is why hex is the compact shorthand for binary in programming.

Can I paste values with 0x or 0b prefixes?

Yes. The hex field accepts a 0x prefix or a bare value, and the binary field accepts 0b or bare digits, so you can paste literals straight from source code.
Embed this tool on your site

Free to embed, no attribution required (but appreciated). Paste this where you want the tool to appear: