🔢

Number Base Converter

Type a number in any base, pick which base it is, and we show it in every common base at once. Clean, fast, no ads.

Binary (2)
Octal (8)
Decimal (10)
Hex (16)
Custom base

Number bases in a nutshell

Every number is written in some base. Base 10 (decimal) uses 10 digits (0–9). Base 2 (binary) uses only 0 and 1 — the language of computers. Base 16 (hex) uses 0–9 plus A–F and is the most compact human-readable way to write binary data (1 hex digit = 4 binary digits).

Programming common bases

Hex for CSS color codes (#FF5733 = red), memory addresses, and error codes. Octal for Unix file permissions (chmod 755). Binary is what the CPU actually executes. Every programmer converts between these in their head at some point — this page saves you the arithmetic.

Frequently asked questions

What does 0xFF mean?

Hex for 255 decimal, or 11111111 binary — one full byte. The 0x prefix marks hex; just type FF and set base to 16.

Negative numbers?

JavaScript handles signed integers — yes, enter -42 decimal and we show it everywhere. Some languages use two's complement for negative binary.

What is base 36?

Uses 0–9 + A–Z, so every number maps to digits and letters. Great for URL shorteners and compressing IDs: "HELLO" base 36 = 2.17 billion decimal.

How does conversion work?

JS <code>parseInt(str,base)</code> parses base 2–36; <code>n.toString(base)</code> converts back. We just wire both directions.

Fractions?

Not in this version — integers only. Fractional bases get complicated (how do you write 0.1 in binary?). Stick to integers.

Last updated

For general calculations only. Not financial, tax, or legal advice — see our disclaimer.

← Back to all tools

See also

We currently set no tracking or advertising cookies. A single non-identifying preference is stored on your device to remember this notice. If advertising or analytics partners that set cookies are added later, we will ask for your consent first. See our Cookie notice and Privacy Policy.