ToolHub

Number Base Converter

Binary, octal, decimal, hex with live sync

Binary

Base 2 · Digits 0–1

0b

4-bit unsigned (fits in uint8)

Octal

Base 8 · Digits 0–7

0o

4-bit unsigned (fits in uint8)

Decimal

Base 10 · Digits 0–9

4-bit unsigned (fits in uint8)

Hexadecimal

Base 16 · Digits 0–9, A–F

0x

4-bit unsigned (fits in uint8)

Binary grouped by nibble (4 bits)

1010

Tip

Paste a value with its standard prefix and we will recognize it: write 0b1010 for binary, 0o12 for octal, or 0xA for hex. Negative numbers also supported (BigInt precision).

Quick steps

1

Type in any field

Edit binary, octal, decimal, or hex. The other three update live as you type.

2

Read the bit-length info

Below each field, see the minimum bits required and the matching unsigned integer type (uint8, uint16, uint32, uint64).

3

Copy any format

Use the copy button next to each label. Standard prefixes (0b, 0o, 0x) are accepted on paste.

Frequently asked questions

What is the largest number I can convert?

We use BigInt internally, so the limit is your browser's memory — practically billions of digits. The first 64 bits cover the common uint8/16/32/64 cases out of the box.

What about negative numbers?

Negative numbers are supported with a leading minus. We do not produce two's complement representations because they require a fixed bit width.

What is natural-order sort vs case-sensitive?

Different tool — this is the number base converter. For sorting lines, see our Sort & Deduplicate Lines tool.

Why does the binary view show spaces?

Binary is grouped in nibbles (4 bits) for readability. Each group equals one hex digit, so you can spot patterns quickly.