Number Base Converter
Convert numbers between binary, octal, decimal and hexadecimal instantly. Type into any field and the others update live, with support for arbitrarily large integers via BigInt.
About the Number Base Converter
Programmers move between number bases constantly — hexadecimal for colors and memory addresses, binary for flags and bitmasks, decimal for everyday math. Converting by hand is slow and error-prone, especially for large values.
This converter keeps binary, octal, decimal and hex in sync as you edit any one of them, using JavaScript BigInt so even very large integers convert exactly. It runs entirely in your browser.
Each base earns its keep in a specific place: hex is compact and maps cleanly onto bytes (two hex digits = one byte), which is why it shows up in color codes, memory addresses and UUIDs. Binary is how flags and bitmasks are actually reasoned about — each bit representing one on/off option, combined with bitwise AND/OR/XOR. Octal's main surviving use is Unix file permissions, where a mode like chmod 755 packs three permission triads (owner, group, other; each read/write/execute) into three octal digits.
BigInt matters here because JavaScript's regular Number type only represents integers exactly up to 2^53 − 1 (Number.MAX_SAFE_INTEGER) — past that, precision silently degrades, a classic source of bugs when converting large hex values or 64-bit IDs. BigInt has no such ceiling, so this converter stays exact even for values far beyond what a standard JS number can safely hold.
How to use it
- 1Type a value into the binary, octal, decimal or hex field.
- 2The other bases update instantly.
- 3Copy whichever representation you need.
Features
- Binary, octal, decimal and hexadecimal — all in sync
- Edit any base and the rest update live
- Handles very large integers (BigInt)
- Validates input per base
- One-click copy of any value
Frequently asked questions
How do I convert binary to decimal?
Type your binary number into the binary field and the decimal equivalent (and octal and hex) appears instantly in the other fields.
Does it support large numbers?
Yes. It uses BigInt, so it converts integers far larger than the usual 64-bit limit without losing precision.
What bases are supported?
Binary (base 2), octal (base 8), decimal (base 10) and hexadecimal (base 16) — the four programmers use most.
Is the conversion done locally?
Yes. Everything is computed in your browser; nothing is sent to a server.
Why is hexadecimal used for colors and memory addresses?
Two hex digits represent exactly one byte (0-255), which maps cleanly onto how colors and memory are actually structured — a much more compact and readable fit than the equivalent binary or decimal value.
What is octal still used for today?
Its main surviving use is Unix/Linux file permissions — a mode like 755 packs three read/write/execute permission triads (owner, group, other) into three octal digits, one digit per group.
Why does this converter use BigInt instead of a regular number?
JavaScript's standard Number type loses precision above 2^53 − 1. BigInt has no such limit, so large hex values, 64-bit IDs, and similar big integers convert exactly instead of silently rounding.