Number base converter

Convert whole numbers between decimal, hexadecimal, binary and octal in real time — all in your browser.

Type in any field and the others update instantly. Conversions use BigInt, so even very large whole numbers stay exact.

Enter digits 0–9 only.
Enter 0–9 and A–F only.
Enter 0 and 1 only.
Enter digits 0–7 only.

How a number base converter works

A number base (or radix) is simply how many distinct digit symbols a counting system uses before it rolls over to a new column. People count in decimal (base 10) because we have ten fingers. Computers count in binary (base 2) because a transistor is either on or off. Hexadecimal (base 16) and octal (base 8) are compact shorthands that map cleanly onto groups of bits, which is why you see them throughout memory addresses, colour codes and file permissions.

Every base uses positional notation: each digit is multiplied by the base raised to the power of its position. This tool reads whatever you type, interprets it in its own base, and re-expresses that same value in the other three — all locally, using JavaScript’s arbitrary-precision BigInt so large values never lose a single digit.

A worked example: 255

Take the decimal number 255. In binary it is 11111111 — eight ones, which is exactly one full byte. Reading that positionally: 128 + 64 + 32 + 16 + 8 + 4 + 2 + 1 = 255. In hexadecimal those eight bits compress neatly into two digits, FF, because each hex digit covers four bits. In octal it becomes 377, grouping the bits in threes. One value, four faces.

Common values across all four bases

DecimalHexBinaryOctalWhy it matters
0000Zero / null in every system
10A101012Line-feed character in ASCII
16101000020First two-digit hex value
64401000000100Word size boundary in many CPUs
1277F1111111177Largest signed 8-bit integer
255FF11111111377One full byte; max per RGB channel

Where each base shows up

Hex for colours & memory

CSS colours like #6650E8 and memory addresses use hex because two digits map to exactly one byte, keeping long values readable.

Octal for Unix permissions

File modes such as chmod 755 use octal: each digit packs the read, write and execute bits for one group of users.

Binary for the hardware

Bit masks, flags and low-level protocols are reasoned about in binary, where each position is a single on/off signal.

Privacy note: this converter has no server component and never transmits your input. Every digit is parsed and re-encoded on your own device, so it is safe to convert addresses, hashes or values from private systems — close the tab and nothing remains.

Frequently asked questions

Is my data sent anywhere when I convert a number?

No. Every conversion is calculated by JavaScript running inside your own browser tab using the native Number and BigInt types. Nothing is uploaded, logged or stored, so it is completely safe to convert values from internal systems, memory dumps or private projects.

Why does 0xFF equal 255 in decimal?

Hexadecimal is base 16, so each position is a power of 16. FF means F×16 + F×1, and F stands for 15, giving 15×16 + 15 = 240 + 15 = 255. That is also why a single byte (eight bits) tops out at 255 — it is the largest value two hex digits can hold.

What is the largest number I can convert?

This tool uses BigInt under the hood, so it converts arbitrarily large whole numbers with no precision loss — far beyond the 9,007,199,254,740,991 ceiling of ordinary JavaScript numbers. You can paste a 256-bit hash or a long binary string and every digit stays exact.

Can it convert negative numbers or fractions?

It converts non-negative whole numbers only. Decimal fractions and signed two’s-complement values use different conventions per architecture, so they are intentionally left out to keep results unambiguous. Strip any sign or decimal point before converting.

What do the letters A–F mean in hexadecimal?

Base 16 needs sixteen distinct digit symbols, but we only have ten (0–9). The letters A, B, C, D, E and F fill the gap, standing for the values 10, 11, 12, 13, 14 and 15 respectively. Case does not matter: 0xff and 0xFF are identical.