Number Base Converter

Free

Convert numbers between binary, octal, decimal, and hexadecimal, instantly.

Runs entirely in your browser. Nothing you enter is uploaded or stored.

Binary (base 2)
Octal (base 8)
Decimal (base 10)
Hexadecimal (base 16)
Custom base
Value in base 3
Bitwise view (two's complement)

Click a bit to flip it — the value updates in every field above immediately. This shows the 8-bit two's-complement representation specifically (the format computers use to store negative integers) — separate from the plain sign-and-magnitude values shown in the fields above (e.g. −42 in decimal reads as −101010 in binary there, with a minus sign, not as a wrapped bit pattern).

This tool runs entirely in your browser — nothing you enter is uploaded or stored.

How it works

What are binary, octal, decimal, and hexadecimal used for?

Decimal (base 10) is the everyday number system. Binary (base 2) is how computers represent data at the lowest level — bytes, flags, and bitwise logic. Hexadecimal (base 16) is a compact, human-friendly stand-in for binary — 4 bits per hex digit — and shows up constantly in memory addresses, color codes, and hash values. Octal (base 8) is less common today but still shows up in Unix file permissions (like chmod 755).

Why does this matter for really large numbers?

JavaScript's regular numbers can only represent whole numbers exactly up to 2^53 − 1 (Number.MAX_SAFE_INTEGER) — a 64-bit hex value or a large binary number can easily exceed that, and a naive converter built on regular numbers would silently round it to the wrong value. This tool uses BigInt throughout instead, which has no such limit, so conversions stay exact no matter how large the number is.

What's the bitwise / two's-complement panel for?

It's a hands-on way to see and edit the actual bit pattern behind a value at a chosen width (8/16/32/64-bit), and specifically how negative numbers are stored using two's complement — the scheme essentially all real computers use, where a negative number's bit pattern is very different from just its positive counterpart with a minus sign. Click any bit to flip it and watch every other field update live.

Is anything I type here sent anywhere?

No — every conversion happens locally in your browser.

Related tools